http://git-wip-us.apache.org/repos/asf/incubator-griffin-site/blob/4f8fa326/node_modules/core-js/build/Gruntfile.ls ---------------------------------------------------------------------- diff --git a/node_modules/core-js/build/Gruntfile.ls b/node_modules/core-js/build/Gruntfile.ls new file mode 100644 index 0000000..6151842 --- /dev/null +++ b/node_modules/core-js/build/Gruntfile.ls @@ -0,0 +1,84 @@ +require! <[./build fs ./config]> +library-tests = <[client/library.js tests/helpers.js tests/library.js]>map -> src: it +module.exports = (grunt)-> + grunt.loadNpmTasks \grunt-contrib-clean + grunt.loadNpmTasks \grunt-contrib-copy + grunt.loadNpmTasks \grunt-contrib-uglify + grunt.loadNpmTasks \grunt-contrib-watch + grunt.loadNpmTasks \grunt-livescript + grunt.loadNpmTasks \grunt-karma + grunt.initConfig do + pkg: grunt.file.readJSON './package.json' + uglify: build: + files: '<%=grunt.option("path")%>.min.js': '<%=grunt.option("path")%>.js' + options: + mangle: {+sort, +keep_fnames} + compress: {+pure_getters, +keep_fargs, +keep_fnames} + sourceMap: on + banner: config.banner + livescript: src: files: + './tests/helpers.js': './tests/helpers/*' + './tests/tests.js': './tests/tests/*' + './tests/library.js': './tests/library/*' + './tests/es.js': './tests/tests/es*' + './tests/experimental.js': './tests/experimental/*' + './build/index.js': './build/build.ls*' + clean: <[./library]> + copy: lib: files: + * expand: on + cwd: './' + src: <[es5/** es6/** es7/** js/** web/** core/** fn/** index.js shim.js]> + dest: './library/' + * expand: on + cwd: './' + src: <[modules/*]> + dest: './library/' + filter: \isFile + * expand: on + cwd: './modules/library/' + src: '*' + dest: './library/modules/' + watch: + core: + files: './modules/*' + tasks: \default + tests: + files: './tests/tests/*' + tasks: \livescript + karma: + 'options': + configFile: './tests/karma.conf.js' + browsers: <[PhantomJS]> + singleRun: on + 'continuous': {} + 'continuous-library': + files: library-tests + grunt.registerTask \build (options)-> + done = @async! + err, it <- build { + modules: (options || 'es5,es6,es7,js,web,core')split \, + blacklist: (grunt.option(\blacklist) || '')split \, + library: !!grunt.option \library + } + if err + console.error err + process.exit 1 + grunt.option(\path) || grunt.option(\path, './custom') + fs.writeFile grunt.option(\path) + '.js', it, done + grunt.registerTask \client -> + grunt.option \library '' + grunt.option \path './client/core' + grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> + grunt.registerTask \library -> + grunt.option \library 'true' + grunt.option \path './client/library' + grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> + grunt.registerTask \shim -> + grunt.option \library '' + grunt.option \path './client/shim' + grunt.task.run <[build:es5,es6,es7,js,web uglify]> + grunt.registerTask \e -> + grunt.option \library ''> + grunt.option \path './client/core' + grunt.task.run <[build:es5,es6,es7,js,web,core,exp uglify]> + grunt.registerTask \default <[clean copy client library shim]> \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-griffin-site/blob/4f8fa326/node_modules/core-js/build/build.ls ---------------------------------------------------------------------- diff --git a/node_modules/core-js/build/build.ls b/node_modules/core-js/build/build.ls new file mode 100644 index 0000000..274ffc4 --- /dev/null +++ b/node_modules/core-js/build/build.ls @@ -0,0 +1,218 @@ +require! {'./config': {banner}, fs: {readFile, writeFile, unlink}, path, webpack} + +list = <[ + es5 + es6.symbol + es6.object.assign + es6.object.is + es6.object.set-prototype-of + es6.object.to-string + es6.object.freeze + es6.object.seal + es6.object.prevent-extensions + es6.object.is-frozen + es6.object.is-sealed + es6.object.is-extensible + es6.object.get-own-property-descriptor + es6.object.get-prototype-of + es6.object.keys + es6.object.get-own-property-names + es6.function.name + es6.function.has-instance + es6.number.constructor + es6.number.epsilon + es6.number.is-finite + es6.number.is-integer + es6.number.is-nan + es6.number.is-safe-integer + es6.number.max-safe-integer + es6.number.min-safe-integer + es6.number.parse-float + es6.number.parse-int + es6.math.acosh + es6.math.asinh + es6.math.atanh + es6.math.cbrt + es6.math.clz32 + es6.math.cosh + es6.math.expm1 + es6.math.fround + es6.math.hypot + es6.math.imul + es6.math.log10 + es6.math.log1p + es6.math.log2 + es6.math.sign + es6.math.sinh + es6.math.tanh + es6.math.trunc + es6.string.from-code-point + es6.string.raw + es6.string.trim + es6.string.code-point-at + es6.string.ends-with + es6.string.includes + es6.string.repeat + es6.string.starts-with + es6.string.iterator + es6.array.from + es6.array.of + es6.array.iterator + es6.array.species + es6.array.copy-within + es6.array.fill + es6.array.find + es6.array.find-index + es6.regexp.constructor + es6.regexp.flags + es6.regexp.match + es6.regexp.replace + es6.regexp.search + es6.regexp.split + es6.promise + es6.map + es6.set + es6.weak-map + es6.weak-set + es6.reflect.apply + es6.reflect.construct + es6.reflect.define-property + es6.reflect.delete-property + es6.reflect.enumerate + es6.reflect.get + es6.reflect.get-own-property-descriptor + es6.reflect.get-prototype-of + es6.reflect.has + es6.reflect.is-extensible + es6.reflect.own-keys + es6.reflect.prevent-extensions + es6.reflect.set + es6.reflect.set-prototype-of + es6.date.to-string + es6.typed.array-buffer + es6.typed.data-view + es6.typed.int8-array + es6.typed.uint8-array + es6.typed.uint8-clamped-array + es6.typed.int16-array + es6.typed.uint16-array + es6.typed.int32-array + es6.typed.uint32-array + es6.typed.float32-array + es6.typed.float64-array + es7.array.includes + es7.string.at + es7.string.pad-left + es7.string.pad-right + es7.string.trim-left + es7.string.trim-right + es7.regexp.escape + es7.object.get-own-property-descriptors + es7.object.values + es7.object.entries + es7.map.to-json + es7.set.to-json + web.immediate + web.dom.iterable + web.timers + core.dict + core.get-iterator-method + core.get-iterator + core.is-iterable + core.delay + core.function.part + core.object.is-object + core.object.classof + core.object.define + core.object.make + core.number.iterator + core.string.escape-html + core.string.unescape-html + core.log + js.array.statics +]> + +experimental = <[ + es6.date.to-string + es6.typed.array-buffer + es6.typed.data-view + es6.typed.int8-array + es6.typed.uint8-array + es6.typed.uint8-clamped-array + es6.typed.int16-array + es6.typed.uint16-array + es6.typed.int32-array + es6.typed.uint32-array + es6.typed.float32-array + es6.typed.float64-array +]> + +libraryBlacklist = <[ + es6.object.to-string + es6.function.name + es6.regexp.constructor + es6.regexp.flags + es6.regexp.match + es6.regexp.replace + es6.regexp.search + es6.regexp.split + es6.number.constructor +]> + +es5SpecialCase = <[ + es6.object.freeze + es6.object.seal + es6.object.prevent-extensions + es6.object.is-frozen + es6.object.is-sealed + es6.object.is-extensible + es6.string.trim +]> + +module.exports = ({modules = [], blacklist = [], library = no}, next)!-> + let @ = modules.reduce ((memo, it)-> memo[it] = on; memo), {} + check = (err)-> + if err + next err, '' + on + + if @exp => for experimental => @[..] = on + if @es5 => for es5SpecialCase => @[..] = on + for ns of @ + if @[ns] + for name in list + if name.indexOf("#ns.") is 0 and name not in experimental + @[name] = on + + if library => blacklist ++= libraryBlacklist + for ns in blacklist + for name in list + if name is ns or name.indexOf("#ns.") is 0 + @[name] = no + + TARGET = "./__tmp#{ Math.random! }__.js" + err, info <~! webpack do + entry: list.filter(~> @[it]).map ~> + path.join(__dirname, '../', "#{ if library => '/library' else '' }/modules/#it") + output: + path: '' + filename: TARGET + if check err => return + err, script <~! readFile TARGET + if check err => return + err <~! unlink TARGET + if check err => return + + next null """ + #banner + !function(__e, __g, undefined){ + 'use strict'; + #script + // CommonJS export + if(typeof module != 'undefined' && module.exports)module.exports = __e; + // RequireJS export + else if(typeof define == 'function' && define.amd)define(function(){return __e}); + // Export to global object + else __g.core = __e; + }(1, 1); + """ http://git-wip-us.apache.org/repos/asf/incubator-griffin-site/blob/4f8fa326/node_modules/core-js/build/config.js ---------------------------------------------------------------------- diff --git a/node_modules/core-js/build/config.js b/node_modules/core-js/build/config.js new file mode 100644 index 0000000..8df3dc6 --- /dev/null +++ b/node_modules/core-js/build/config.js @@ -0,0 +1,8 @@ +module.exports = { + banner: '/**\n' + + ' * core-js ' + require('../package').version + '\n' + + ' * https://github.com/zloirock/core-js\n' + + ' * License: http://rock.mit-license.org\n' + + ' * © ' + new Date().getFullYear() + ' Denis Pushkarev\n' + + ' */' +}; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-griffin-site/blob/4f8fa326/node_modules/core-js/build/index.js ---------------------------------------------------------------------- diff --git a/node_modules/core-js/build/index.js b/node_modules/core-js/build/index.js new file mode 100644 index 0000000..d9cf11f --- /dev/null +++ b/node_modules/core-js/build/index.js @@ -0,0 +1,98 @@ +// Generated by LiveScript 1.3.1 +(function(){ + var banner, ref$, readFile, writeFile, unlink, path, webpack, list, experimental, libraryBlacklist, es5SpecialCase; + banner = require('./config').banner; + ref$ = require('fs'), readFile = ref$.readFile, writeFile = ref$.writeFile, unlink = ref$.unlink; + path = require('path'); + webpack = require('webpack'); + list = ['es5', 'es6.symbol', 'es6.object.assign', 'es6.object.is', 'es6.object.set-prototype-of', 'es6.object.to-string', 'es6.object.freeze', 'es6.object.seal', 'es6.object.prevent-extensions', 'es6.object.is-frozen', 'es6.object.is-sealed', 'es6.object.is-extensible', 'es6.object.get-own-property-descriptor', 'es6.object.get-prototype-of', 'es6.object.keys', 'es6.object.get-own-property-names', 'es6.function.name', 'es6.function.has-instance', 'es6.number.constructor', 'es6.number.epsilon', 'es6.number.is-finite', 'es6.number.is-integer', 'es6.number.is-nan', 'es6.number.is-safe-integer', 'es6.number.max-safe-integer', 'es6.number.min-safe-integer', 'es6.number.parse-float', 'es6.number.parse-int', 'es6.math.acosh', 'es6.math.asinh', 'es6.math.atanh', 'es6.math.cbrt', 'es6.math.clz32', 'es6.math.cosh', 'es6.math.expm1', 'es6.math.fround', 'es6.math.hypot', 'es6.math.imul', 'es6.math.log10', 'es6.math.log1p', 'es6.math.log2', 'es6.math.sign', 'es6.math.sinh', 'es6.math.tanh', 'es 6.math.trunc', 'es6.string.from-code-point', 'es6.string.raw', 'es6.string.trim', 'es6.string.code-point-at', 'es6.string.ends-with', 'es6.string.includes', 'es6.string.repeat', 'es6.string.starts-with', 'es6.string.iterator', 'es6.array.from', 'es6.array.of', 'es6.array.iterator', 'es6.array.species', 'es6.array.copy-within', 'es6.array.fill', 'es6.array.find', 'es6.array.find-index', 'es6.regexp.constructor', 'es6.regexp.flags', 'es6.regexp.match', 'es6.regexp.replace', 'es6.regexp.search', 'es6.regexp.split', 'es6.promise', 'es6.map', 'es6.set', 'es6.weak-map', 'es6.weak-set', 'es6.reflect.apply', 'es6.reflect.construct', 'es6.reflect.define-property', 'es6.reflect.delete-property', 'es6.reflect.enumerate', 'es6.reflect.get', 'es6.reflect.get-own-property-descriptor', 'es6.reflect.get-prototype-of', 'es6.reflect.has', 'es6.reflect.is-extensible', 'es6.reflect.own-keys', 'es6.reflect.prevent-extensions', 'es6.reflect.set', 'es6.reflect.set-prototype-of', 'es6.date.to-string', 'es6 .typed.array-buffer', 'es6.typed.data-view', 'es6.typed.int8-array', 'es6.typed.uint8-array', 'es6.typed.uint8-clamped-array', 'es6.typed.int16-array', 'es6.typed.uint16-array', 'es6.typed.int32-array', 'es6.typed.uint32-array', 'es6.typed.float32-array', 'es6.typed.float64-array', 'es7.array.includes', 'es7.string.at', 'es7.string.pad-left', 'es7.string.pad-right', 'es7.string.trim-left', 'es7.string.trim-right', 'es7.regexp.escape', 'es7.object.get-own-property-descriptors', 'es7.object.values', 'es7.object.entries', 'es7.map.to-json', 'es7.set.to-json', 'web.immediate', 'web.dom.iterable', 'web.timers', 'core.dict', 'core.get-iterator-method', 'core.get-iterator', 'core.is-iterable', 'core.delay', 'core.function.part', 'core.object.is-object', 'core.object.classof', 'core.object.define', 'core.object.make', 'core.number.iterator', 'core.string.escape-html', 'core.string.unescape-html', 'core.log', 'js.array.statics']; + experimental = ['es6.date.to-string', 'es6.typed.array-buffer', 'es6.typed.data-view', 'es6.typed.int8-array', 'es6.typed.uint8-array', 'es6.typed.uint8-clamped-array', 'es6.typed.int16-array', 'es6.typed.uint16-array', 'es6.typed.int32-array', 'es6.typed.uint32-array', 'es6.typed.float32-array', 'es6.typed.float64-array']; + libraryBlacklist = ['es6.object.to-string', 'es6.function.name', 'es6.regexp.constructor', 'es6.regexp.flags', 'es6.regexp.match', 'es6.regexp.replace', 'es6.regexp.search', 'es6.regexp.split', 'es6.number.constructor']; + es5SpecialCase = ['es6.object.freeze', 'es6.object.seal', 'es6.object.prevent-extensions', 'es6.object.is-frozen', 'es6.object.is-sealed', 'es6.object.is-extensible', 'es6.string.trim']; + module.exports = function(arg$, next){ + var modules, ref$, blacklist, library; + modules = (ref$ = arg$.modules) != null + ? ref$ + : [], blacklist = (ref$ = arg$.blacklist) != null + ? ref$ + : [], library = (ref$ = arg$.library) != null ? ref$ : false; + (function(){ + var check, i$, x$, ref$, len$, y$, ns, name, j$, len1$, TARGET, this$ = this; + check = function(err){ + if (err) { + next(err, ''); + return true; + } + }; + if (this.exp) { + for (i$ = 0, len$ = (ref$ = experimental).length; i$ < len$; ++i$) { + x$ = ref$[i$]; + this[x$] = true; + } + } + if (this.es5) { + for (i$ = 0, len$ = (ref$ = es5SpecialCase).length; i$ < len$; ++i$) { + y$ = ref$[i$]; + this[y$] = true; + } + } + for (ns in this) { + if (this[ns]) { + for (i$ = 0, len$ = (ref$ = list).length; i$ < len$; ++i$) { + name = ref$[i$]; + if (name.indexOf(ns + ".") === 0 && !in$(name, experimental)) { + this[name] = true; + } + } + } + } + if (library) { + blacklist = blacklist.concat(libraryBlacklist); + } + for (i$ = 0, len$ = blacklist.length; i$ < len$; ++i$) { + ns = blacklist[i$]; + for (j$ = 0, len1$ = (ref$ = list).length; j$ < len1$; ++j$) { + name = ref$[j$]; + if (name === ns || name.indexOf(ns + ".") === 0) { + this[name] = false; + } + } + } + TARGET = "./__tmp" + Math.random() + "__.js"; + webpack({ + entry: list.filter(function(it){ + return this$[it]; + }).map(function(it){ + return path.join(__dirname, '../', (library ? '/library' : '') + "/modules/" + it); + }), + output: { + path: '', + filename: TARGET + } + }, function(err, info){ + if (check(err)) { + return; + } + readFile(TARGET, function(err, script){ + if (check(err)) { + return; + } + unlink(TARGET, function(err){ + if (check(err)) { + return; + } + next(null, "" + banner + "\n!function(__e, __g, undefined){\n'use strict';\n" + script + "\n// CommonJS export\nif(typeof module != 'undefined' && module.exports)module.exports = __e;\n// RequireJS export\nelse if(typeof define == 'function' && define.amd)define(function(){return __e});\n// Export to global object\nelse __g.core = __e;\n}(1, 1);"); + }); + }); + }); + }.call(modules.reduce(function(memo, it){ + memo[it] = true; + return memo; + }, {}))); + }; + function in$(x, xs){ + var i = -1, l = xs.length >>> 0; + while (++i < l) if (x === xs[i]) return true; + return false; + } +}).call(this);
