From d35f1fa6c885e94cc010a4bf950ee877d5405d87 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 28 May 2014 11:44:53 -0700 Subject: [PATCH 1/3] package: specify app.js in main for `slc run` Supervisor needs a main property in the package to find what to run if there is no top-level server.js or app.js. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5381488..920f115 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "loopback-example-full-stack", "version": "0.0.1", "description": "LoopBack browser and server example", - "main": "index.js", + "main": "web/app.js", "directories": { "test": "test" }, From 094709e258b9062a4aec2af4b2a5eb83a883dc54 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 28 May 2014 11:55:09 -0700 Subject: [PATCH 2/3] package: run `gulp build` in build script strong-build uses a build script (if it exists) to run custom build scripts before call `npm pack`. --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 920f115..f36fb4b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "test": "test" }, "scripts": { - "test": "gulp test" + "test": "gulp test", + "build": "gulp build" }, "repository": { "type": "git", From 0a053a9cbf288fa4bd18bf0c035543ad9ce47915 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 28 May 2014 12:37:21 -0700 Subject: [PATCH 3/3] package: add a .npmignore file Not strictly necessary for strong-build, but having one is safer and more explicit. I also sorted .gitignore, to allow a simple diff of .gitignore and .npmignore to verify that build products are packed and non-build files (such as editor ephemera, test output, npm log files, etc.) are still ignored by npm. --- .gitignore | 30 ++++++++++++------------------ .npmignore | 13 +++++++++++++ 2 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 .npmignore diff --git a/.gitignore b/.gitignore index 82c7ed7..d75f5fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,19 @@ -lib-cov -*.seed -*.log *.csv *.dat +*.gz +*.log *.out *.pid -*.gz - -pids +*.seed +.DS_Store +build +global.config.js +html5/build +lib-cov +local.config.js logs -results - -npm-debug.log node_modules +npm-debug.log +pids public/bundle.js - -html5/build - -global.config.js -local.config.js - -.DS_Store - -build +results diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..3eacba0 --- /dev/null +++ b/.npmignore @@ -0,0 +1,13 @@ +*.csv +*.dat +*.gz +*.log +*.out +*.pid +*.seed +.DS_Store +lib-cov +logs +npm-debug.log +pids +results