For ease of local development, connect Coalesce to your test app through coalesce-ember by copying built dist dirs directly to the bower_components/vendor directory. This will allow for changes to be built immediately without the need to publish to Bower. We will also add a build script to one-line all the steps of the build process.
1 Coalesce
-
Clone coalesce
git clone [email protected]:coalescejs/coalesce.git
-
Run the dependency installs
npm install
-
Test that you can build a distributable
npm run-script build
2 Coalesce Ember
-
Clone coalesce-ember
git clone [email protected]:coalescejs/coalesce-ember.git
-
Remove the bower version of coalesce from the bower.json file and dir if it is there
bower uninstall --save coalesce
-
Run the dependency installs
npm install
-
Make a direcoty in bower_components (since we removed it from our dependencies) that will hold a copy of the coalesce source we built locally.
mkdir bower_components/coalesce-ember
3 Your Test App
For whatever reason, adding simlinks to the bower_components directory will often throw file-not-found type errors. To work around this we will just copy the build coalesce-ember/dist directory into our test app's vendor directory. We will include this in our final build script.
-
Generate your testbench Ember CLI app, or use an existing app. If you have already installed coalesce-ember, remove it
bower uninstall --save coalesce-ember
-
Make a direcoty in vendor that will hold a copy of the source we built locally.
mkdir vendor/coalesce-ember
-
Add the dependency to your Brocfile.js
app.import('vendor/coalesce-ember/src/main.js');
-
Include our build script in the package.json file
"scripts": { "build": "./build.sh", }
Build the whole thing with NPM: npm run-script build
(or just run the script directly)