Änderungen admin
This commit is contained in:
26
test/node_modules/startbootstrap-sb-admin/scripts/render-scripts.js
generated
vendored
Normal file
26
test/node_modules/startbootstrap-sb-admin/scripts/render-scripts.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
const fs = require('fs');
|
||||
const packageJSON = require('../package.json');
|
||||
const upath = require('upath');
|
||||
const sh = require('shelljs');
|
||||
|
||||
module.exports = function renderScripts() {
|
||||
|
||||
const sourcePath = upath.resolve(upath.dirname(__filename), '../src/js');
|
||||
const destPath = upath.resolve(upath.dirname(__filename), '../dist/.');
|
||||
|
||||
sh.cp('-R', sourcePath, destPath)
|
||||
|
||||
const sourcePathScriptsJS = upath.resolve(upath.dirname(__filename), '../src/js/scripts.js');
|
||||
const destPathScriptsJS = upath.resolve(upath.dirname(__filename), '../dist/js/scripts.js');
|
||||
|
||||
const copyright = `/*!
|
||||
* Start Bootstrap - ${packageJSON.title} v${packageJSON.version} (${packageJSON.homepage})
|
||||
* Copyright 2013-${new Date().getFullYear()} ${packageJSON.author}
|
||||
* Licensed under ${packageJSON.license} (https://github.com/StartBootstrap/${packageJSON.name}/blob/master/LICENSE)
|
||||
*/
|
||||
`
|
||||
const scriptsJS = fs.readFileSync(sourcePathScriptsJS);
|
||||
|
||||
fs.writeFileSync(destPathScriptsJS, copyright + scriptsJS);
|
||||
};
|
Reference in New Issue
Block a user