summaryrefslogtreecommitdiffstats
path: root/core/scripts
diff options
context:
space:
mode:
authorAlex Pott2017-05-19 22:12:53 (GMT)
committerAlex Pott2017-05-19 22:12:53 (GMT)
commit8287017e034bc323dec1d86b3f37a804aa082d2d (patch)
treeebd8ff908859b0e1cc4319392da94e8f68033321 /core/scripts
parent9a0e9a649ac8078ce6e5f6089749a1115bdda06b (diff)
Issue #2818825 by drpal, nod_, droplet, cilefen: Rename all JS files to *.es6.js and compile them
Diffstat (limited to 'core/scripts')
-rw-r--r--core/scripts/js/changeOrAdded.js9
-rw-r--r--core/scripts/js/rename-js-files-to-es6.sh12
2 files changed, 8 insertions, 13 deletions
diff --git a/core/scripts/js/changeOrAdded.js b/core/scripts/js/changeOrAdded.js
index 1f8b1ee..e6d1a96 100644
--- a/core/scripts/js/changeOrAdded.js
+++ b/core/scripts/js/changeOrAdded.js
@@ -12,7 +12,14 @@ module.exports = (filePath) => {
filePath,
{
sourceMaps: process.env.NODE_ENV === 'development' ? 'inline' : false,
- comments: false
+ comments: false,
+ plugins: [
+ ['add-header-comment', {
+ 'header': [
+ `DO NOT EDIT THIS FILE.\nAll changes should be applied to ${filePath}\nSee the following change record for more information,\nhttps://www.drupal.org/node/2873849\n@preserve`
+ ]
+ }]
+ ]
},
(err, result) => {
if (err) {
diff --git a/core/scripts/js/rename-js-files-to-es6.sh b/core/scripts/js/rename-js-files-to-es6.sh
deleted file mode 100644
index 5ae2a89..0000000
--- a/core/scripts/js/rename-js-files-to-es6.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-# Rename *.js files in *.es6.js. Only need to be run once.
-# Should be removed after *.es6.js files are committed to core.
-#
-# @internal This file is part of the core javascript build process and is only
-# meant to be used in that context.
-
-for js in `find ./{misc,modules,themes} -name '*.js'`;
-do
- mv ${js} ${js%???}.es6.js;
-done