[Pkg-javascript-commits] [libjs-handlebars] 01/02: use Gruntfile from master branch

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Jan 1 16:36:53 UTC 2018


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository libjs-handlebars.

commit 97fe3d4a1ac44fc390b6bb12f4c1c62907e18162
Author: Pirate Praveen <praveen at debian.org>
Date:   Mon Jan 1 21:50:00 2018 +0530

    use Gruntfile from master branch
---
 debian/patches/port-to-babel6-webpack3.patch | 158 +++++++++++++++++++++++++--
 debian/patches/series                        |   2 +-
 debian/patches/skip-some-modules.patch       |  17 ++-
 3 files changed, 157 insertions(+), 20 deletions(-)

diff --git a/debian/patches/port-to-babel6-webpack3.patch b/debian/patches/port-to-babel6-webpack3.patch
index 744c7b0..815b3d7 100644
--- a/debian/patches/port-to-babel6-webpack3.patch
+++ b/debian/patches/port-to-babel6-webpack3.patch
@@ -16,7 +16,30 @@ Subject: [PATCH 1/2] upgrade webpack
  /* eslint-disable no-process-env */
  module.exports = function(grunt) {
  
-@@ -46,7 +48,12 @@
+@@ -22,19 +24,15 @@
+       dist: {
+         options: {
+           processContent: function(content) {
+-            return grunt.template.process('/**!\n\n @license\n <%= pkg.name %> v<%= pkg.version %>\n\n<%= grunt.file.read("LICENSE") %>\n*/\n')
+-                + content;
++            return grunt.template.process('/**!\n\n @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat\n <%= pkg.name %> v<%= pkg.version %>\n\n<%= grunt.file.read("LICENSE") %>\n*/\n')
++                + content
++		+ '\n// @license-end\n';
+           }
+         },
+         files: [
+           {expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/'}
+         ]
+       },
+-      cdnjs: {
+-        files: [
+-          {expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/cdnjs'}
+-        ]
+-      },
+       components: {
+         files: [
+           {expand: true, cwd: 'components/', src: ['**'], dest: 'dist/components'},
+@@ -46,25 +44,15 @@
      babel: {
        options: {
          sourceMaps: 'inline',
@@ -29,26 +52,141 @@ Subject: [PATCH 1/2] upgrade webpack
 +        ],
          auxiliaryCommentBefore: 'istanbul ignore next'
        },
-       amd: {
-@@ -83,7 +90,7 @@
-           ]
-         },
+-      amd: {
+-        options: {
+-          modules: 'amd'
+-        },
+-        files: [{
+-          expand: true,
+-          cwd: 'lib/',
+-          src: '**/!(index).js',
+-          dest: 'dist/amd/'
+-        }]
+-      },
+-
+       cjs: {
+-        options: {
+-          modules: 'common'
+-        },
+         files: [{
+           cwd: 'lib/',
+           expand: true,
+@@ -73,54 +61,33 @@
+         }]
+       }
+     },
++
+     webpack: {
+       options: {
+         context: __dirname,
+-        module: {
+-          loaders: [
+-            // the optional 'runtime' transformer tells babel to require the runtime instead of inlining it.
+-            { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader?optional=runtime&loose=es6.modules&auxiliaryCommentBefore=istanbul%20ignore%20next' }
+-          ]
+-        },
          output: {
 -          path: 'dist/',
 +          path: path.join(__dirname, 'dist'),
            library: 'Handlebars',
            libraryTarget: 'umd'
-         }
-@@ -92,6 +99,9 @@
-         entry: './lib/handlebars.js',
-         output: {
-           filename: 'handlebars.js'
 +        },
 +        module: {
 +          noParse: [ /parser\.js$/ ]
          }
        },
+       handlebars: {
+-        entry: './lib/handlebars.js',
++        entry: './dist/cjs/handlebars.js',
+         output: {
+           filename: 'handlebars.js'
+         }
+       },
        runtime: {
+-        entry: './lib/handlebars.runtime.js',
++        entry: './dist/cjs/handlebars.runtime.js',
+         output: {
+           filename: 'handlebars.runtime.js'
+         }
+       }
+     },
+ 
+-    requirejs: {
+-      options: {
+-        optimize: 'none',
+-        baseUrl: 'dist/amd/'
+-      },
+-      dist: {
+-        options: {
+-          name: 'handlebars',
+-          out: 'dist/handlebars.amd.js'
+-        }
+-      },
+-      runtime: {
+-        options: {
+-          name: 'handlebars.runtime',
+-          out: 'dist/handlebars.runtime.amd.js'
+-        }
+-      }
+-    },
+-
+     uglify: {
+       options: {
+         mangle: true,
+@@ -160,7 +127,7 @@
+       all: {
+         options: {
+           build: process.env.TRAVIS_JOB_ID,
+-          urls: ['http://localhost:9999/spec/?headless=true', 'http://localhost:9999/spec/amd.html?headless=true'],
++          urls: ['http://localhost:9999/spec/?headless=true'],
+           detailedError: true,
+           concurrency: 4,
+           browsers: [
+@@ -176,11 +143,12 @@
+       sanity: {
+         options: {
+           build: process.env.TRAVIS_JOB_ID,
+-          urls: ['http://localhost:9999/spec/umd.html?headless=true', 'http://localhost:9999/spec/amd-runtime.html?headless=true', 'http://localhost:9999/spec/umd-runtime.html?headless=true'],
++          urls: ['http://localhost:9999/spec/umd.html?headless=true', 'http://localhost:9999/spec/umd-runtime.html?headless=true'],
+           detailedError: true,
+           concurrency: 2,
+           browsers: [
+-            {browserName: 'chrome'}
++            {browserName: 'chrome'},
++            {browserName: 'internet explorer', version: 10, platform: 'Windows 8'}
+           ]
+         }
+       }
+@@ -193,7 +161,7 @@
+         },
+ 
+         files: ['src/*', 'lib/**/*.js', 'spec/**/*.js'],
+-        tasks: ['build', 'amd', 'tests', 'test']
++        tasks: ['build', 'tests', 'test']
+       }
+     }
+   });
+@@ -205,19 +173,17 @@
+                     'node',
+                     'globals']);
+ 
+-  this.registerTask('amd', ['babel:amd', 'requirejs']);
+   this.registerTask('node', ['babel:cjs']);
+   this.registerTask('globals', ['webpack']);
+   this.registerTask('tests', ['concat:tests']);
+ 
+-  this.registerTask('release', 'Build final packages', ['eslint', 'amd', 'uglify', 'test:min', 'copy:dist', 'copy:components', 'copy:cdnjs']);
++  this.registerTask('release', 'Build final packages', ['eslint', 'uglify', 'test:min', 'copy:dist', 'copy:components']);
+ 
+   // Load tasks from npm
+   grunt.loadNpmTasks('grunt-contrib-clean');
+   grunt.loadNpmTasks('grunt-contrib-concat');
+   grunt.loadNpmTasks('grunt-contrib-connect');
+   grunt.loadNpmTasks('grunt-contrib-copy');
+-  grunt.loadNpmTasks('grunt-contrib-requirejs');
+   grunt.loadNpmTasks('grunt-contrib-uglify');
+   grunt.loadNpmTasks('grunt-contrib-watch');
+   grunt.loadNpmTasks('grunt-babel');
 --- a/package.json
 +++ b/package.json
 @@ -30,13 +30,16 @@
diff --git a/debian/patches/series b/debian/patches/series
index 61ef92c..c78fac2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
+port-to-babel6-webpack3.patch
 skip-some-modules.patch
 use-system-jison.patch
-port-to-babel6-webpack3.patch
diff --git a/debian/patches/skip-some-modules.patch b/debian/patches/skip-some-modules.patch
index 76937b7..096eb2b 100644
--- a/debian/patches/skip-some-modules.patch
+++ b/debian/patches/skip-some-modules.patch
@@ -1,6 +1,6 @@
 --- a/Gruntfile.js
 +++ b/Gruntfile.js
-@@ -200,7 +200,6 @@
+@@ -168,7 +168,6 @@
  
    // Build a new version of the library
    this.registerTask('build', 'Builds a distributable version of the current project', [
@@ -8,28 +8,27 @@
                      'parser',
                      'node',
                      'globals']);
-@@ -210,19 +209,19 @@
+@@ -177,18 +176,18 @@
    this.registerTask('globals', ['webpack']);
    this.registerTask('tests', ['concat:tests']);
  
--  this.registerTask('release', 'Build final packages', ['eslint', 'amd', 'uglify', 'test:min', 'copy:dist', 'copy:components', 'copy:cdnjs']);
-+  this.registerTask('release', 'Build final packages', ['amd', 'uglify', 'test:min', 'copy:dist', 'copy:components', 'copy:cdnjs']);
+-  this.registerTask('release', 'Build final packages', ['eslint', 'uglify', 'test:min', 'copy:dist', 'copy:components']);
++  this.registerTask('release', 'Build final packages', ['uglify', 'test:min', 'copy:dist', 'copy:components']);
  
    // Load tasks from npm
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-concat');
 -  grunt.loadNpmTasks('grunt-contrib-connect');
-+  //grunt.loadNpmTasks('grunt-contrib-connect');
++//  grunt.loadNpmTasks('grunt-contrib-connect');
    grunt.loadNpmTasks('grunt-contrib-copy');
-   grunt.loadNpmTasks('grunt-contrib-requirejs');
    grunt.loadNpmTasks('grunt-contrib-uglify');
 -  grunt.loadNpmTasks('grunt-contrib-watch');
-+  //grunt.loadNpmTasks('grunt-contrib-watch');
++//  grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-babel');
 -  grunt.loadNpmTasks('grunt-eslint');
 -  grunt.loadNpmTasks('grunt-saucelabs');
-+  //grunt.loadNpmTasks('grunt-eslint');
-+  //grunt.loadNpmTasks('grunt-saucelabs');
++//  grunt.loadNpmTasks('grunt-eslint');
++//  grunt.loadNpmTasks('grunt-saucelabs');
    grunt.loadNpmTasks('grunt-webpack');
  
    grunt.task.loadTasks('tasks');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/libjs-handlebars.git



More information about the Pkg-javascript-commits mailing list