aboutsummaryrefslogtreecommitdiff
path: root/node_modules/core-js/build
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/core-js/build')
-rw-r--r--node_modules/core-js/build/Gruntfile.ls84
-rw-r--r--node_modules/core-js/build/build.ls62
-rw-r--r--node_modules/core-js/build/config.js259
-rw-r--r--node_modules/core-js/build/index.js104
4 files changed, 509 insertions, 0 deletions
diff --git a/node_modules/core-js/build/Gruntfile.ls b/node_modules/core-js/build/Gruntfile.ls
new file mode 100644
index 000000000..f4b53809a
--- /dev/null
+++ b/node_modules/core-js/build/Gruntfile.ls
@@ -0,0 +1,84 @@
+require! <[./build fs ./config]>
+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/** stage/** 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
+ 'default': {}
+ 'library': files: <[client/library.js tests/helpers.js tests/library.js]>map -> src: it
+ grunt.registerTask \build (options)->
+ done = @async!
+ build {
+ modules: (options || 'es5,es6,es7,js,web,core')split \,
+ blacklist: (grunt.option(\blacklist) || '')split \,
+ library: grunt.option(\library) in <[yes on true]>
+ umd: grunt.option(\umd) not in <[no off false]>
+ }
+ .then !->
+ grunt.option(\path) || grunt.option(\path, './custom')
+ fs.writeFile grunt.option(\path) + '.js', it, done
+ .catch !->
+ console.error it
+ process.exit 1
+ 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
diff --git a/node_modules/core-js/build/build.ls b/node_modules/core-js/build/build.ls
new file mode 100644
index 000000000..0cf210de5
--- /dev/null
+++ b/node_modules/core-js/build/build.ls
@@ -0,0 +1,62 @@
+require! {
+ '../library/fn/promise': Promise
+ './config': {list, experimental, libraryBlacklist, es5SpecialCase, banner}
+ fs: {readFile, writeFile, unlink}
+ path: {join}
+ webpack, temp
+}
+
+module.exports = ({modules = [], blacklist = [], library = no, umd = on})->
+ resolve, reject <~! new Promise _
+ let @ = modules.reduce ((memo, it)-> memo[it] = on; memo), {}
+ 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 = temp.path {suffix: '.js'}
+
+ err, info <~! webpack do
+ entry: list.filter(~> @[it]).map ~>
+ if library => join __dirname, '..', 'library', 'modules', it
+ else join __dirname, '..', 'modules', it
+ output:
+ path: ''
+ filename: TARGET
+ if err => return reject err
+
+ err, script <~! readFile TARGET
+ if err => return reject err
+
+ err <~! unlink TARGET
+ if err => return reject err
+
+ if umd
+ exportScript = """
+ // 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;
+ """
+ else
+ exportScript = ""
+
+ resolve """
+ #banner
+ !function(__e, __g, undefined){
+ 'use strict';
+ #script
+ #exportScript
+ }(1, 1);
+ """ \ No newline at end of file
diff --git a/node_modules/core-js/build/config.js b/node_modules/core-js/build/config.js
new file mode 100644
index 000000000..df09eb12d
--- /dev/null
+++ b/node_modules/core-js/build/config.js
@@ -0,0 +1,259 @@
+module.exports = {
+ list: [
+ 'es6.symbol',
+ 'es6.object.define-property',
+ 'es6.object.define-properties',
+ 'es6.object.get-own-property-descriptor',
+ 'es6.object.create',
+ 'es6.object.get-prototype-of',
+ 'es6.object.keys',
+ 'es6.object.get-own-property-names',
+ 'es6.object.freeze',
+ 'es6.object.seal',
+ 'es6.object.prevent-extensions',
+ 'es6.object.is-frozen',
+ 'es6.object.is-sealed',
+ 'es6.object.is-extensible',
+ 'es6.object.assign',
+ 'es6.object.is',
+ 'es6.object.set-prototype-of',
+ 'es6.object.to-string',
+ 'es6.function.bind',
+ 'es6.function.name',
+ 'es6.function.has-instance',
+ 'es6.number.constructor',
+ 'es6.number.to-fixed',
+ 'es6.number.to-precision',
+ '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.parse-int',
+ 'es6.parse-float',
+ '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.string.anchor',
+ 'es6.string.big',
+ 'es6.string.blink',
+ 'es6.string.bold',
+ 'es6.string.fixed',
+ 'es6.string.fontcolor',
+ 'es6.string.fontsize',
+ 'es6.string.italics',
+ 'es6.string.link',
+ 'es6.string.small',
+ 'es6.string.strike',
+ 'es6.string.sub',
+ 'es6.string.sup',
+ 'es6.array.is-array',
+ 'es6.array.from',
+ 'es6.array.of',
+ 'es6.array.join',
+ 'es6.array.slice',
+ 'es6.array.sort',
+ 'es6.array.for-each',
+ 'es6.array.map',
+ 'es6.array.filter',
+ 'es6.array.some',
+ 'es6.array.every',
+ 'es6.array.reduce',
+ 'es6.array.reduce-right',
+ 'es6.array.index-of',
+ 'es6.array.last-index-of',
+ 'es6.array.copy-within',
+ 'es6.array.fill',
+ 'es6.array.find',
+ 'es6.array.find-index',
+ 'es6.array.iterator',
+ 'es6.array.species',
+ 'es6.regexp.constructor',
+ 'es6.regexp.to-string',
+ '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.now',
+ 'es6.date.to-json',
+ 'es6.date.to-iso-string',
+ 'es6.date.to-string',
+ 'es6.date.to-primitive',
+ '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-start',
+ 'es7.string.pad-end',
+ 'es7.string.trim-left',
+ 'es7.string.trim-right',
+ 'es7.string.match-all',
+ 'es7.symbol.async-iterator',
+ 'es7.symbol.observable',
+ 'es7.object.get-own-property-descriptors',
+ 'es7.object.values',
+ 'es7.object.entries',
+ 'es7.object.enumerable-keys',
+ 'es7.object.enumerable-values',
+ 'es7.object.enumerable-entries',
+ 'es7.object.define-getter',
+ 'es7.object.define-setter',
+ 'es7.object.lookup-getter',
+ 'es7.object.lookup-setter',
+ 'es7.map.to-json',
+ 'es7.set.to-json',
+ 'es7.system.global',
+ 'es7.error.is-error',
+ 'es7.math.iaddh',
+ 'es7.math.isubh',
+ 'es7.math.imulh',
+ 'es7.math.umulh',
+ 'es7.reflect.define-metadata',
+ 'es7.reflect.delete-metadata',
+ 'es7.reflect.get-metadata',
+ 'es7.reflect.get-metadata-keys',
+ 'es7.reflect.get-own-metadata',
+ 'es7.reflect.get-own-metadata-keys',
+ 'es7.reflect.has-metadata',
+ 'es7.reflect.has-own-metadata',
+ 'es7.reflect.metadata',
+ 'es7.asap',
+ 'es7.observable',
+ '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.regexp.escape',
+ 'core.string.escape-html',
+ 'core.string.unescape-html',
+ ],
+ experimental: [
+ 'es7.object.enumerable-keys',
+ 'es7.object.enumerable-values',
+ 'es7.object.enumerable-entries',
+ ],
+ libraryBlacklist: [
+ 'es6.object.to-string',
+ 'es6.function.name',
+ 'es6.regexp.constructor',
+ 'es6.regexp.to-string',
+ 'es6.regexp.flags',
+ 'es6.regexp.match',
+ 'es6.regexp.replace',
+ 'es6.regexp.search',
+ 'es6.regexp.split',
+ 'es6.number.constructor',
+ 'es6.date.to-string',
+ 'es6.date.to-primitive',
+ ],
+ es5SpecialCase: [
+ 'es6.object.create',
+ 'es6.object.define-property',
+ 'es6.object.define-properties',
+ 'es6.object.get-own-property-descriptor',
+ 'es6.object.get-prototype-of',
+ 'es6.object.keys',
+ 'es6.object.get-own-property-names',
+ 'es6.object.freeze',
+ 'es6.object.seal',
+ 'es6.object.prevent-extensions',
+ 'es6.object.is-frozen',
+ 'es6.object.is-sealed',
+ 'es6.object.is-extensible',
+ 'es6.function.bind',
+ 'es6.array.is-array',
+ 'es6.array.join',
+ 'es6.array.slice',
+ 'es6.array.sort',
+ 'es6.array.for-each',
+ 'es6.array.map',
+ 'es6.array.filter',
+ 'es6.array.some',
+ 'es6.array.every',
+ 'es6.array.reduce',
+ 'es6.array.reduce-right',
+ 'es6.array.index-of',
+ 'es6.array.last-index-of',
+ 'es6.number.to-fixed',
+ 'es6.number.to-precision',
+ 'es6.date.now',
+ 'es6.date.to-iso-string',
+ 'es6.date.to-json',
+ 'es6.string.trim',
+ 'es6.regexp.to-string',
+ 'es6.parse-int',
+ 'es6.parse-float',
+ ],
+ 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
diff --git a/node_modules/core-js/build/index.js b/node_modules/core-js/build/index.js
new file mode 100644
index 000000000..26bdec415
--- /dev/null
+++ b/node_modules/core-js/build/index.js
@@ -0,0 +1,104 @@
+// Generated by LiveScript 1.4.0
+(function(){
+ var Promise, ref$, list, experimental, libraryBlacklist, es5SpecialCase, banner, readFile, writeFile, unlink, join, webpack, temp;
+ Promise = require('../library/fn/promise');
+ ref$ = require('./config'), list = ref$.list, experimental = ref$.experimental, libraryBlacklist = ref$.libraryBlacklist, es5SpecialCase = ref$.es5SpecialCase, banner = ref$.banner;
+ ref$ = require('fs'), readFile = ref$.readFile, writeFile = ref$.writeFile, unlink = ref$.unlink;
+ join = require('path').join;
+ webpack = require('webpack');
+ temp = require('temp');
+ module.exports = function(arg$){
+ var modules, ref$, blacklist, library, umd, this$ = this;
+ modules = (ref$ = arg$.modules) != null
+ ? ref$
+ : [], blacklist = (ref$ = arg$.blacklist) != null
+ ? ref$
+ : [], library = (ref$ = arg$.library) != null ? ref$ : false, umd = (ref$ = arg$.umd) != null ? ref$ : true;
+ return new Promise(function(resolve, reject){
+ (function(){
+ var i$, x$, ref$, len$, y$, ns, name, j$, len1$, TARGET, this$ = this;
+ 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 = temp.path({
+ suffix: '.js'
+ });
+ webpack({
+ entry: list.filter(function(it){
+ return this$[it];
+ }).map(function(it){
+ if (library) {
+ return join(__dirname, '..', 'library', 'modules', it);
+ } else {
+ return join(__dirname, '..', 'modules', it);
+ }
+ }),
+ output: {
+ path: '',
+ filename: TARGET
+ }
+ }, function(err, info){
+ if (err) {
+ return reject(err);
+ }
+ readFile(TARGET, function(err, script){
+ if (err) {
+ return reject(err);
+ }
+ unlink(TARGET, function(err){
+ var exportScript;
+ if (err) {
+ return reject(err);
+ }
+ if (umd) {
+ exportScript = "// 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;";
+ } else {
+ exportScript = "";
+ }
+ resolve("" + banner + "\n!function(__e, __g, undefined){\n'use strict';\n" + script + "\n" + exportScript + "\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);