Skip to content

Commit

Permalink
gulp generate_jspm_config now generates the jspm config files
Browse files Browse the repository at this point in the history
  • Loading branch information
gkovacs committed Jul 27, 2016
1 parent 1a8bded commit c4919de
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
/src/jspm_packages/npm_custom/**/node_modules
/releases
.getsecret.yaml
/jspm_config_frontend.js
/jspm_config_backend.js
29 changes: 29 additions & 0 deletions gulpfile.ls
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,35 @@ gulp.task 'generate_expose_backend_libs', (done) ->
fs.writeFileSync "src/generated_libs/libs_backend/expose_backend_libs.js", output.join("\n")
done()

gulp.task 'generate_jspm_config_frontend', (done) ->
{get_alias_info} = require './alias_utils'
output = []
path_map = {}
for alias_info in get_alias_info()
{path, frontend} = alias_info
path_map[path] = frontend
fs.writeFileSync 'jspm_config_frontend.js', """
System.config({
paths: #{JSON.stringify(path_map)}
});
"""
done()

gulp.task 'generate_jspm_config_backend', (done) ->
{get_alias_info} = require './alias_utils'
output = []
path_map = {}
for alias_info in get_alias_info()
{path, backend} = alias_info
path_map[path] = backend
fs.writeFileSync 'jspm_config_backend.js', """
System.config({
paths: #{JSON.stringify(path_map)}
});
"""
done()

gulp.task 'generate_jspm_config', gulp.parallel('generate_jspm_config_frontend', 'generate_jspm_config_backend')

gulp.task 'generate_polymer_components_html', (done) ->
#if fs.existsSync('src/components/components.html')
Expand Down

0 comments on commit c4919de

Please sign in to comment.