Procházet zdrojové kódy

Adds rollup bundling (disabled)

main
Eric Amodio před 7 roky
rodič
revize
0cb1e2c2fa
7 změnil soubory, kde provedl 156 přidání a 107 odebrání
  1. +2
    -1
      .gitignore
  2. +3
    -0
      .vscodeignore
  3. +117
    -104
      package-lock.json
  4. +5
    -0
      package.json
  5. +25
    -0
      rollup.config.js
  6. +3
    -2
      src/system/date.ts
  7. +1
    -0
      tsconfig.json

+ 2
- 1
.gitignore Zobrazit soubor

@ -1,2 +1,3 @@
out
node_modules
node_modules
.rpt2_cache

+ 3
- 0
.vscodeignore Zobrazit soubor

@ -9,7 +9,10 @@ src/**
**/*.map
.github/**
.gitignore
.rpt2_cache/**
CODE_OF_CONDUCT.md
package-lock.json
rollup.config.js
tsconfig.json
tslint.json
webpack.config.js

+ 117
- 104
package-lock.json Zobrazit soubor

@ -568,32 +568,6 @@
"is-glob": "2.0.1",
"path-is-absolute": "1.0.1",
"readdirp": "2.1.0"
},
"dependencies": {
"glob-parent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
"dev": true,
"requires": {
"is-glob": "2.0.1"
}
},
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
"dev": true
},
"is-glob": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"dev": true,
"requires": {
"is-extglob": "1.0.0"
}
}
}
},
"chownr": {
@ -1193,6 +1167,12 @@
"integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
"dev": true
},
"estree-walker": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.3.1.tgz",
"integrity": "sha1-5rGlHPcpJSTnI3wxLl/mZgwc4ao=",
"dev": true
},
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
@ -1295,14 +1275,6 @@
"dev": true,
"requires": {
"is-extglob": "1.0.0"
},
"dependencies": {
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
"dev": true
}
}
},
"extsprintf": {
@ -1446,6 +1418,17 @@
"readable-stream": "2.3.3"
}
},
"fs-extra": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
"integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
"dev": true,
"requires": {
"graceful-fs": "4.1.11",
"jsonfile": "4.0.0",
"universalify": "0.1.1"
}
},
"fs-write-stream-atomic": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz",
@ -2446,42 +2429,15 @@
"requires": {
"glob-parent": "2.0.0",
"is-glob": "2.0.1"
},
"dependencies": {
"glob-parent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
"dev": true,
"requires": {
"is-glob": "2.0.1"
}
},
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
"dev": true
},
"is-glob": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"dev": true,
"requires": {
"is-extglob": "1.0.0"
}
}
}
},
"glob-parent": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
"integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
"dev": true,
"requires": {
"is-glob": "3.1.0",
"path-dirname": "1.0.2"
"is-glob": "2.0.1"
}
},
"glob-stream": {
@ -2513,6 +2469,31 @@
"path-is-absolute": "1.0.1"
}
},
"glob-parent": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
"integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"dev": true,
"requires": {
"is-glob": "3.1.0",
"path-dirname": "1.0.2"
}
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
"dev": true
},
"is-glob": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
"integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
"dev": true,
"requires": {
"is-extglob": "2.1.1"
}
},
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
@ -3188,9 +3169,9 @@
"dev": true
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
"dev": true
},
"is-fullwidth-code-point": {
@ -3203,12 +3184,12 @@
}
},
"is-glob": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
"integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"dev": true,
"requires": {
"is-extglob": "2.1.1"
"is-extglob": "1.0.0"
}
},
"is-my-json-valid": {
@ -3359,6 +3340,15 @@
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
"dev": true
},
"jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"dev": true,
"requires": {
"graceful-fs": "4.1.11"
}
},
"jsonify": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
@ -3720,21 +3710,6 @@
"regex-cache": "0.4.4"
},
"dependencies": {
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
"dev": true
},
"is-glob": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"dev": true,
"requires": {
"is-extglob": "1.0.0"
}
},
"normalize-path": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
@ -4117,23 +4092,6 @@
"is-dotfile": "1.0.3",
"is-extglob": "1.0.0",
"is-glob": "2.0.1"
},
"dependencies": {
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
"dev": true
},
"is-glob": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"dev": true,
"requires": {
"is-extglob": "1.0.0"
}
}
}
},
"parse-json": {
@ -4720,6 +4678,55 @@
"inherits": "2.0.3"
}
},
"rollup": {
"version": "0.52.3",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-0.52.3.tgz",
"integrity": "sha512-cw+vb9NqaTXlwJyb8G+Ve+uhhlVTcl1NKBkfANdeQqVcpZFilQgeNnAnNiu7MwfeXrqiKEGz+3R03a3zeFkmEQ==",
"dev": true
},
"rollup-plugin-typescript2": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.9.0.tgz",
"integrity": "sha512-nM2oP7mduvmAv4HSCmJFRJ18XRhULIuoMMDuqP+wQIjuJbKdm3wJne0dRym2q8DgUmarxE3N3IzJs2xq/GuyPQ==",
"dev": true,
"requires": {
"fs-extra": "4.0.3",
"resolve": "1.5.0",
"rollup-pluginutils": "2.0.1",
"tslib": "1.8.1"
}
},
"rollup-plugin-uglify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-2.0.1.tgz",
"integrity": "sha1-Z7N60e/a+9g69MNrQMGJ7khmyWk=",
"dev": true,
"requires": {
"uglify-js": "3.2.2"
},
"dependencies": {
"uglify-js": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.2.2.tgz",
"integrity": "sha512-++1NO/zZIEdWf6cDIGceSJQPX31SqIpbVAHwFG5+240MtZqPG/NIPoinj8zlXQtAfMBqEt1Jyv2FiLP3n9gVhQ==",
"dev": true,
"requires": {
"commander": "2.12.2",
"source-map": "0.6.1"
}
}
}
},
"rollup-pluginutils": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz",
"integrity": "sha1-fslbNXP2VDpGpkYb2afFRFJdD8A=",
"dev": true,
"requires": {
"estree-walker": "0.3.1",
"micromatch": "2.3.11"
}
},
"run-queue": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz",
@ -5303,6 +5310,12 @@
"through2-filter": "2.0.0"
}
},
"universalify": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz",
"integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=",
"dev": true
},
"url": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",

+ 5
- 0
package.json Zobrazit soubor

@ -2923,6 +2923,7 @@
],
"scripts": {
"bundle": "npm run lint && webpack --env.production",
"bundle-rollup": "npm run lint && rollup -c",
"clean": "git clean -xdf",
"compile": "npm run lint && tsc -p ./",
"watch": "tsc -watch -p ./",
@ -2949,9 +2950,13 @@
"@types/node": "8.5.2",
"@types/tmp": "0.0.33",
"husky": "^0.14.3",
"rollup": "^0.52.3",
"rollup-plugin-typescript2": "^0.9.0",
"rollup-plugin-uglify": "^2.0.1",
"ts-loader": "^3.2.0",
"tslint": "5.8.0",
"typescript": "2.6.2",
"uglify-es": "3.2.2",
"uglifyjs-webpack-plugin": "^1.1.4",
"vscode": "1.1.10",
"webpack": "^3.10.0",

+ 25
- 0
rollup.config.js Zobrazit soubor

@ -0,0 +1,25 @@
import typescript from 'rollup-plugin-typescript2';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';
export default {
input: './src/extension.ts',
output: {
file: 'out/extension.js',
format: 'cjs'
},
plugins: [
typescript(),
uglify({
ecma: 7,
compress: true,
mangle: true,
output: {
beautify: false,
comments: false,
ecma: 7
},
sourceMap: false,
}, minify),
]
}

+ 3
- 2
src/system/date.ts Zobrazit soubor

@ -112,9 +112,10 @@ function buildDistanceInWordsLocale() {
}
// Monkey patch the locale to customize the wording
(en as any).distanceInWords = buildDistanceInWordsLocale();
const patch = (en as any);
patch.distanceInWords = buildDistanceInWordsLocale();
const formatterOptions = { addSuffix: true, locale: en };
const formatterOptions = { addSuffix: true, locale: patch };
export namespace Dates {

+ 1
- 0
tsconfig.json Zobrazit soubor

@ -4,6 +4,7 @@
"importHelpers": true,
"lib": [ "es2015", "es2016" ],
"module": "commonjs",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,

Načítá se…
Zrušit
Uložit