javascript - Generate zip of polymer app without all the non-production files -


If you install a polymer applications using arbor gives you a countless number of files that you do not need .

  • Tags that are not being imported
  • Most / bower_components /
  • in README.md and documentation . DEMO files in the most / bower_components /

    It does not matter if you are running it on a http server, but if you It is important to bundle a packed application now, with this, vulcanize is possible all this html tag is inline, but in lieu of the file still the context like

      & lt; polymer-element [...] assetpath = "bower_components / core-icon /" & gt; In fact, this issue is not actually solved, I believe that I am facing only this problem, so am I doing something wrong or what? > 

    You can use to generate your production code. I have attached a basic grunting configurations that will help you.

    The script assumes the following Grunt plugins:

      Content-Contrib-clean cunt-Kantrib-Const Grnt- CSSC purr-DOM-Munger matchdep   

    For example grunt.js:

      module.exports = function (grunting) {grunt.initConfig ({pkg: grunting .file.readJSON ( 'package.json'), dom_munger: {read: {options: {read: [{selector: 'click', featuring: 'href', writeto: 'CssRefs', isPath: true} {selector: 'script [source]', featuring: 'src', writeto : 'JsRefs', isPath: true}]}, src:' src / index.html '}, urlRewrite: {option: {remove: [' click ',' s Please enter: [[Selector: 'head', html: '& lt; link href = "style / screen.css" rel = "stylesheet" /> gt;'}, {selector: body ' Html: & lt; script src = "script / main.app" & gt; & lt; / script & gt; '}]}, src: [dist / index.html']}}, concat: {options: { separator: ';'}, district: {files: { 'district / script / main.js' [ '& lt;% = dom_munger.data.JsRefs% & gt;']}}}, CSSC: {district: { options: {so rtSelectors: false, LINEBREAKS: false, SortDeclarations: false, ConsolidateViaDeclarations: false, ConsolidateViaSelectors: false, ConsolidateMediaQueries: false} files: { 'district / style / screen.css' [' & lt;% = dom_munger. Data.CssRefs% & Gt; ']}}}, Clear: {dist: {src: [' dist ']}}}); // Load all the necessary nest plug-ins ('matchdeep'). FilterDev ('gruff - *'). ForEach (grunt.loadNpmTasks); // custom work grunt.registerTask ('default', ['clean', 'dom_munger: read', 'concat', 'cssc', 'dom_munger: urlRewrite']); };   

    This is just a basic example that you can increase for your needs.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -