diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.yml index 3894a2d469..baa4f101ad 100644 --- a/.github/workflows/ci-frontend.yml +++ b/.github/workflows/ci-frontend.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/setup-node@v2-beta with: - node-version: '12' + node-version: '12' #same as .nvmrc - uses: actions/cache@v2 with: diff --git a/groundcontrol/gulp-plugins/twig.js b/groundcontrol/gulp-plugins/twig.js index bad00e489d..59f0b005eb 100644 --- a/groundcontrol/gulp-plugins/twig.js +++ b/groundcontrol/gulp-plugins/twig.js @@ -17,11 +17,10 @@ export default function twig(options) { try { let contents = file.contents.toString(); - // Twig.js uses different escaping compared to the PHP version // This line was failing the renderering, as we don't put backlashes in the testdata it could be removed - contents = contents.replace(/\|replace\(\{\'\\\\\'\:\'\/\'\}\)/gmi, ''); - + contents = contents.replace(/\|replace\(\{\'\\\\\'\:\'(\/|\-)\'\}\)/gmi, ''); + const template = Twig.twig({ data: contents }); @@ -34,4 +33,4 @@ export default function twig(options) { } }); -}; \ No newline at end of file +}; diff --git a/groundcontrol/tasks/build-gc-skeleton.js b/groundcontrol/tasks/build-gc-skeleton.js index 7e4db387d0..c5e46cc8fb 100644 --- a/groundcontrol/tasks/build-gc-skeleton.js +++ b/groundcontrol/tasks/build-gc-skeleton.js @@ -20,12 +20,12 @@ const runChildProcess = (executable, args, cwd, cb) => { }); }; -export default function createBuildGroundControlSkeletonTask(skeletonPath, namespace = 'kuma/my-project') { +export default function createBuildGroundControlSkeletonTask(skeletonPath, namespace = 'kuma-my-project') { const distPath = skeletonPath + '/dist'; - const appPath = distPath + '/src/' + namespace; - const jsPath = appPath + '/Resources/ui/js'; - const scssPath = appPath + '/Resources/ui/scss'; - const adminJsPath = appPath + '/Resources/admin/js'; + const appPath = distPath + '/assets'; + const jsPath = appPath + '/ui/js'; + const scssPath = appPath + '/ui/scss'; + const adminJsPath = appPath + '/admin'; return [ function cleanGroundControlSkeleton() { @@ -42,7 +42,8 @@ export default function createBuildGroundControlSkeletonTask(skeletonPath, names getName: () => 'test-bundle', namespace }, - demosite: false + demosite: false, + isV4: true })) .pipe(gulp.dest(distPath)); }, @@ -56,8 +57,6 @@ export default function createBuildGroundControlSkeletonTask(skeletonPath, names fs.writeFileSync(adminJsPath + '/admin-bundle-extra.js', 'console.log(\'Hello world from admin\');\n'); fs.ensureDirSync(scssPath); fs.writeFileSync(scssPath + '/style.scss', 'body { font-size: 20px; }\n'); - // Style guide - fs.copySync(skeletonPath + '/../Resources/ui/styleguide', appPath + '/Resources/ui/styleguide'); // Index.html const html = ` @@ -69,13 +68,13 @@ export default function createBuildGroundControlSkeletonTask(skeletonPath, names - +