cloverfield-tools / cf-package

Cloverfield Package Scaffold
MIT License
98 stars 14 forks source link

Add compilation step for npm publishing, fixes #4 #8

Closed nkbt closed 9 years ago

nkbt commented 9 years ago

Installation

At the moment just install from path (until published)

[nkbt@nkbt] ~ $ npm install -g /Users/nkbt/nkbt/cf-package

> cf-package@0.0.1 prepublish /Users/nkbt/nkbt/cf-package
> npm run build

/
> cf-package@0.0.1 build /Users/nkbt/nkbt/cf-package
> npm run build:clean && npm run build:lib

\
> cf-package@0.0.1 build:clean /Users/nkbt/nkbt/cf-package
> rimraf build

\
> cf-package@0.0.1 build:lib /Users/nkbt/nkbt/cf-package
> babel lib --out-dir build

lib/cli.js -> build/cli.js
lib/generate.js -> build/generate.js
lib/parseProps.js -> build/parseProps.js

> fsevents@0.3.8 install /Users/nkbt/.nvm/v0.10.40/lib/node_modules/cf-package/node_modules/babel/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
/Users/nkbt/.nvm/v0.10.40/bin/cf-package -> /Users/nkbt/.nvm/v0.10.40/lib/node_modules/cf-package/build/cli.js
cf-package@0.0.1 /Users/nkbt/.nvm/v0.10.40/lib/node_modules/cf-package
├── mkdirp@0.5.1 (minimist@0.0.8)
├── nomnom@1.8.1 (underscore@1.6.0, chalk@0.4.0)
├── glob@5.0.14 (path-is-absolute@1.0.0, inherits@2.0.1, once@1.3.2, inflight@1.0.4, minimatch@2.0.10)
├── prompt@0.2.14 (revalidator@0.1.8, pkginfo@0.3.0, read@1.0.6, utile@0.2.1, winston@0.8.3)
├── handlebars@3.0.3 (source-map@0.1.43, optimist@0.6.1, uglify-js@2.3.6)
└── babel@5.8.21 (slash@1.0.0, path-is-absolute@1.0.0, path-exists@1.0.0, fs-readdir-recursive@0.1.2, convert-source-map@1.1.1, output-file-sync@1.1.1, commander@2.8.1, source-map@0.4.4, lodash@3.10.1, babel-core@5.8.22, chokidar@1.0.5)

Use

[nkbt@nkbt] ~ $ mkdir test-package
[nkbt@nkbt] ~ $ cd test-package/
[nkbt@nkbt] test-package $ cf-package 
> Package name: test
[nkbt@nkbt] test-package $ ls -al
total 56
drwxr-xr-x   10 nkbt  staff   340 Aug 15 22:40 .
drwxr-xr-x@ 149 nkbt  staff  5066 Aug 15 22:31 ..
-rw-r--r--    1 nkbt  staff    17 Aug 15 22:40 .babelrc
-rw-r--r--    1 nkbt  staff   166 Aug 15 22:40 .editorconfig
-rw-r--r--    1 nkbt  staff   110 Aug 15 22:40 .travis.yml
-rw-r--r--    1 nkbt  staff  1068 Aug 15 22:40 LICENSE
-rw-r--r--    1 nkbt  staff   199 Aug 15 22:40 README.md
-rw-r--r--    1 nkbt  staff  1995 Aug 15 22:40 package.json
drwxr-xr-x    3 nkbt  staff   102 Aug 15 22:40 source
-rw-r--r--    1 nkbt  staff  1047 Aug 15 22:40 webpack.config.js
ericelliott commented 9 years ago

Looks fine but has conflicts.

nkbt commented 9 years ago

Yeah, the downside of making parallel independent PRs. Will resolve asap