Skip to content

Commit

Permalink
Reorganize the amd build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongrout committed Aug 15, 2017
1 parent 3d5f1ac commit 8ecdc1f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/html-manager/scripts/concat-amd-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@
// Distributed under the terms of the Modified BSD License.

var fs = require('fs');
var files = ['base.js', 'controls.js', 'index.js', 'libembed-amd.js', 'embed-amd-render.js'];

// Make a script file that defines all of the relevant AMD modules
var files = ['base.js', 'controls.js', 'index.js', 'libembed-amd.js'];
var output = files.map((f)=>{
return fs.readFileSync('./dist/amd/'+f).toString();
}).join(';\n\n');
fs.writeFileSync('./dist/libembed-amd.js', output)

// Make a script that has all of the above AMD modules and runs a function which
// renders all of the widgets on page load automatically.
files = ['base.js', 'controls.js', 'index.js', 'libembed-amd.js', 'embed-amd-render.js'];
var output = files.map((f)=>{
return fs.readFileSync('./dist/amd/'+f).toString();
}).join(';\n\n');
Expand Down

0 comments on commit 8ecdc1f

Please sign in to comment.