mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 17:32:15 +03:00
7e6800b2b8
This commit achieves a few things: - ☑️ No longer having to remember whether a command is yarn something or grunt something - ☑️ Simplification of tools hopefully making them easier to remember and use - ☑️ Complete removal of the need for grunt from our test tooling Several of the tools still use grunt under the hood, but the **entrypoint** should aways be `yarn xxx`. - `grunt main` -> `yarn main` - `grunt dev` -> `yarn dev` - `grunt build` -> `yarn build` - `grunt test:file-or-folder` -> `yarn test file-or-folder` - `grunt test-unit` -> `yarn test:unit` - `grunt test-acceptance` -> `yarn test:acceptance` - `grunt test-regression` -> `yarn test:regression` - `grunt validate` -> removed due to lack of use There is now also `yarn test:all` to run all 3 classes of tests This PR also reorders & restructures the Gruntfile extensively so that: - The remaining useful commands are all at the top of the file - Config and other blah happens after all the useful commands - All release-only config happens in the release task at the very end of the file --- DONE: * Removed all references to npm/bower * Removed all references to lint / deprecated command * Moved debug to yarn dev:debug * Removed all references to travis * Removed broken help task + useless comment * Removed unused knex-migrator and clean:test setup tasks * Added new test commands, removed grunt validate * Moved stubClientFiles to test utility and use in the few tests that need it * Used mocha in yarn directly except grunt test:x * Swapped grunt test for yarn test * extensive cleanup and reshuffling
18 lines
447 B
JavaScript
18 lines
447 B
JavaScript
const fs = require('fs-extra');
|
|
const path = require('path');
|
|
|
|
const clientFiles = [
|
|
'server/web/admin/views/default.html',
|
|
'built/assets/ghost.js',
|
|
'built/assets/ghost.css',
|
|
'built/assets/vendor.js',
|
|
'built/assets/vendor.css'
|
|
];
|
|
|
|
module.exports.stubClientFiles = () => {
|
|
clientFiles.forEach((file) => {
|
|
const filePath = path.resolve(__dirname, '../../core/', file);
|
|
fs.ensureFileSync(filePath);
|
|
});
|
|
};
|