GithubHelp home page GithubHelp logo

handsontable / hot-builder Goto Github PK

View Code? Open in Web Editor NEW
16.0 21.0 10.0 328 KB

CLI tool for building custom Handsontable package

License: MIT License

JavaScript 98.18% Shell 1.82%
custom-handsontable builder handsontable

hot-builder's Introduction

hot-builder Build Status hot-builder

A CLI tool for building custom Handsontable spreadsheet component.

Table of contents

  1. Installation
  2. Basic usage
  3. Examples
  4. License
  5. Contact

Installation

Install the tool using npm.

npm install hot-builder -g

Basic usage

> hot-builder build

Builds custom version of handsontable.

Arguments:

  • -i, --input - Path to a directory where Handsontable Community Edition or Handsontable PRO repository was downloaded.
  • -o, --output-dir - Output directory where generated bundle will be saved.
  • -a, --include-all - Includes all found modules into generated bundle.
  • -A, --add-module - Includes specified modules into generated bundle (eg. -A ContextMenu,ManualRowMove).
  • -R, --remove-module - Excludes specified modules from generated bundle (eg. -R ContextMenu,ManualRowMove).
  • -U, --no-ui - Disables the UI.
  • --repository-tag - Specifies which version of Handsontable Community Edition or Handsontable PRO repository will be cloned (eg. --repository-tag develop, or --repository-tag 0.32.0). This option is active only if you omitted -i, --input argument.
  • --pro - Indicates that version specified by --repository-tag argument will be referring to the Handsontable PRO package.
  • --debug - Debug mode - will output debug messages from workers.
> hot-builder -h

Displays hot-builder help information.

> hot-builder -V

Prints the installed hot-builder version.

Examples

Build your custom handsontable Community Edition package (from the handsontable remote repository)

$ hot-builder build -o hot-dist

Or build your custom handsontable Community Edition package using a local directory

$ hot-builder build -i path-to-your-handsontable-copy/ -o hot-dist

After executing command and selecting plugins, the builder automatically resolves all plugins and external libraries before building a package in the hot-dist directory.

If it works correctly, you should see something like:

hot-builder #1 hot-builder #1

Additional examples:

License

hot-builder is released under the MIT license. Copyrights belong to Handsoncode sp. z o.o.

Contact

Feel free to give us feedback on this tool using this contact form or write directly at [email protected].

hot-builder's People

Contributors

budnix avatar jameslefrere avatar jansiegel avatar wszymanski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hot-builder's Issues

Missing compatibility with Handsontable CE >= 0.34.4

In the Handsontable CE 0.34.4 and PRO 1.14.2 was introduced changes which break compatibility with current build setup. It is necessary to fix that configuration for the newest version of Handsontable.

These changes won't be compatible with an older version of Handsontable. For building older versions of the Handsontable, the previous version of hot-builder will be necessary.

This will be a breaking change.

pro version build problem

Hello,

I'm trying to build a pro version package, and got the following error:
"Input package file is not valid. It must point to a package.json file from Handsontable or HandsontablePro project."

the folder I tried the command was your cloned git repo, the 1.1.1 tag was checked out
"hot-builder build -o ./dist --input package.json"

any idea?

thanks,
David

Wrong handsontable dependency branch

There is an error while building handsontable-pro when compatibleHotVersion is set as develop (or another branch). While building a package this property is ignored which results in a incorrectnesses in the generated dist/ files. When it built two or more times it works as expected.

Module zeroclipboard not found

I'm not sure what I'm doing wrong here.

"hot-builder": "0.4.1"

If I follow the directions and run...

npm install -g hot-builder
hot-builder build -o dist/handsontable

I get Module zeroclipboard not found and that's the end of it.

I've tried npm install -S zeroclipboard just for kicks, but nothing seems to work.

Any ideas? The only reason I'm using hot-builder is because when I try to run browserify across the manually-downloaded handsontable.js I get this error:

handsontable:16
import './shims/classes';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

I just want to use this tool!

Wrong declaration for ObserveChanges in hot-builder UI

It is only an information error, custom package is build properly.

If I select ColumnSorting plugin I get automatically ObserveChanges plugin stated via Included dependency note. However it is marked as excluded from plugins below:

observe-changes

Some es6 operators not transpiled in dist output

I'm trying to use the hot-builder to generate a slimmed down version of handsontable. We use a pretty standard setup with npm, so I was thinking one option to incorporate this tool into that workflow would be to just publish a custom package with the customized dist output from hot builder and import that into the project as you would with the actual handsontable package.

I'm encountering issues with the dist folder output from the hot builder not transpiling some ES6 operators (I'm specifically seeing the spread and exponentiation operator). I'm wondering if this is an oversight and the dist output should be expected to be completely transpiled down to ES5, or if you're assuming some level of action on the consumer's side to further transpile the output of hot builder. Thanks for any feedback!

Module moment not found

Hi guys,

I'm running into

$ hot-builder build  --output-dir hot-dist
Creating custom build...

[✓] Cloning repository...                                           [finished]
[✓] Installing all necessary dependencies (it will take a while)... [finished]

Module moment not found

The repo gets cloned into /home/sebastian/.nvm/versions/node/v7.4.0/lib/node_modules/hot-builder.
Any ideas?

Support for new Handsontable build stack

The Handsontable repository currently (on develop branch) contains a new babel+webpack build stack which is not supported by hot-builder. It is necessary to apply some changes to the source code of hot-builder to support this new stack.

Connected with this issue.

Wrong dependency list appears while building hot

For example ColumnSorting plugin has only ObserveChanges in it's dependency and builder shows additional jsonpatch which is a ObserveChanges dependency. Jsonpatch shouldn't appear in this case.

Tests

The hot-builder currently strongly depends on the Handsontable dependencies. It may be a situation that someone upgrades some of that dependencies into the Handsontable repository and forgot checked if building process using hot-builder is still operating. To mitigate that failure every commit pushed into the Handsontable repository should trigger hot-builder tests silently.

Improve label minifier plugin

Improve label minifier plugin to shrink long module's paths/names into shorter counterparts. This technique should allow to cut several kilobytes.

Support for PRO

Support for building Handsontable PRO package.

Todo:

  • Custom license separately for FREE and PRO (included from LICENSE file);
  • Identify build type under Handsontable.packageName;
  • Fix bug related with building Handsontable PRO .full.min.js (moment.js is not defined).

Tried it and got a stack trace

Here's what happened when I tried to use hot-builder on OS X:

I entered this command:

emerald:HandsontableTest fcahoon$ hot-builder build -o lib

Received this prompt:

? Select modules that will be used to build your custom Handsontable distribution package: (Press <space> to select)
 ──────────────
 External libraries:
❯◯ jquery-ui
 ◯ shims
 ◯ moment
 ◯ pikaday
 ◯ zeroclipboard

I chose jquery-ui (also tried several others, with the same error result):

? Select modules that will be used to build your custom Handsontable distribution package: 
Creating custom build (Handsontable v0.14.1)...

Founded 0 plugins

/usr/local/lib/node_modules/hot-builder/node_modules/inquirer/node_modules/rx/dist/rx.js:579
    throw e;
          ^
Error: ENOENT, no such file or directory '/usr/local/lib/node_modules/hot-builder/node_modules/handsontable/intro.js'
    at Error (native)
    at Object.fs.openSync (fs.js:500:18)
    at Object.fs.readFileSync (fs.js:352:15)
    at JSWorker.run (/usr/local/lib/node_modules/hot-builder/lib/workers/js-worker.js:69:14)
    at /usr/local/lib/node_modules/hot-builder/lib/worker.js:73:12
    at /usr/local/lib/node_modules/hot-builder/node_modules/async/lib/async.js:125:13
    at Array.forEach (native)
    at _each (/usr/local/lib/node_modules/hot-builder/node_modules/async/lib/async.js:46:24)
    at Object.async.each (/usr/local/lib/node_modules/hot-builder/node_modules/async/lib/async.js:124:9)
    at Worker.run (/usr/local/lib/node_modules/hot-builder/lib/worker.js:72:9)
emerald:HandsontableTest fcahoon$ 

Note, the intro.js file indeed does not exist. Here's what I have in the directory where it was supposed to be:

emerald:HandsontableTest fcahoon$ ls -F /usr/local/lib/node_modules/hot-builder/node_modules/handsontable
CHANGELOG.md            README.md           index.html          sauce_connect.log
CNAME               bower.json          index.html.orig         src/
CONTRIBUTING.md         demo/               lib/                test/
Gruntfile.js            dist/               package.json            update.json
LICENSE             handsontable.jquery.json    plugins/

Module ObserveChanges not found

Trying to run this tool on Windows:

>npm install -g hot-builder
C:\Users\user\AppData\Roaming\npm\hot-builder -> C:\Users\user\AppData\Roaming\npm\node_modules\hot-builder\bin\hot-builder
[email protected] C:\Users\user\AppData\Roaming\npm\node_modules\hot-builder
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], proces
[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected],
 [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], buff
[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected]
└── [email protected]

>hot-builder build --output-dir hot-dist
Module ObserveChanges not found

Language files should be generated

From Handsontable CE 0.35.0 / Handsontable Pro 1.15.0 language files are generated in process of build. hot-builder should be adopted to this situation.

Support for NPM

hot-builder should build package in such a way that it can be used in NPM environment. This is necessary for support developers who want to build theirs apps package by tools like browserify.

Internal libraries

Builder should include ours internal libraries (/lib) to every distribution file. Currently handsontable.js file doesn't have this files which is confused for users.

Only truly external libraries like moment.js, pikaday, zeroclipboard should be excluded from handsontable.js file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.