Permalink
Browse files

splitting source code into different polyfills for better reusability

  • Loading branch information...
caridy committed Feb 24, 2014
1 parent 932e4aa commit 9734603326c05d2a7db7e09af8f34c8fb5110fe5
Showing with 1,436 additions and 1,390 deletions.
  1. +1 −0 .gitignore
  2. +27 −11 Gruntfile.js
  3. +1 −1 dist/es6-module-loader.js
  4. +7 −7 dist/traceur.js
  5. +0 −1,367 lib/es6-module-loader.js
  6. +5 −0 lib/index.js
  7. +550 −0 lib/loader.js
  8. +45 −0 lib/module.js
  9. +149 −0 lib/promise.js
  10. +646 −0 lib/system.js
  11. +3 −2 package.json
  12. +1 −1 test/test.html
  13. +1 −1 test/test.js
View
@@ -1 +1,2 @@
node_modules
+tmp
View
@@ -9,12 +9,35 @@ module.exports = function (grunt) {
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n */\n'
},
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc'
+ },
+ dist: [
+ 'lib/index.js',
+ 'lib/promise.js',
+ 'lib/module.js',
+ 'lib/loader.js',
+ 'lib/system.js'
+ ]
+ },
+ concat: {
+ dist: {
+ src: [
+ 'lib/promise.js',
+ 'lib/module.js',
+ 'lib/loader.js',
+ 'lib/system.js'
+ ],
+ dest: 'tmp/<%= pkg.name %>.js'
+ }
+ },
uglify: {
options: {
banner: '<%= meta.banner %>'
},
dist: {
- src: 'lib/<%= pkg.name %>.js',
+ src: 'tmp/<%= pkg.name %>.js',
dest: 'dist/<%= pkg.name %>.js'
},
traceur: {
@@ -24,20 +47,13 @@ module.exports = function (grunt) {
src: 'lib/traceur.js',
dest: 'dist/traceur.js'
}
- },
- jshint: {
- options: {
- jshintrc: '.jshintrc'
- },
- dist: [
- 'lib/es6-module-loader.js',
- 'test/es6-module-loader_test.js'
- ]
}
});
+ grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.registerTask('default', [/*'jshint', */'uglify']);
+ grunt.registerTask('lint', ['jshint']);
+ grunt.registerTask('default', [/*'jshint', */'concat', 'uglify']);
};

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 9734603

Please sign in to comment.