Переглянути джерело

[MIN] added the Babel Object Rest Plugin (#4589)

* added rest operator for babel

* added package-lock.json to .gitignore

* removed package-lock.json
version-14
Achilles Rasquinha 7 роки тому
committed by Faris Ansari
джерело
коміт
c87172345f
3 змінених файлів з 8 додано та 1 видалено
  1. +5
    -1
      .gitignore
  2. +2
    -0
      frappe/build.js
  3. +1
    -0
      package.json

+ 5
- 1
.gitignore Переглянути файл

@@ -10,4 +10,8 @@ dist/
build/
frappe/docs/current
.vscode
node_modules
node_modules


# Not Recommended, but will remove once webpack ready
package-lock.json

+ 2
- 0
frappe/build.js Переглянути файл

@@ -154,11 +154,13 @@ function get_compiled_file(file, output_path, minify, force_compile) {

function babelify(content, path, minify) {
let presets = ['env'];
var plugins = ['transform-object-rest-spread']
// Minification doesn't work when loading Frappe Desk
// Avoid for now, trace the error and come back.
try {
return babel.transform(content, {
presets: presets,
plugins: plugins,
comments: false
}).code;
} catch (e) {


+ 1
- 0
package.json Переглянути файл

@@ -23,6 +23,7 @@
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-preset-minify": "^0.2.0",
"chokidar": "^1.7.0",


Завантаження…
Відмінити
Зберегти