Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate theme editor #573

Merged
merged 1 commit into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
server/plugins/stencil-editor/public/**/*.js
server/plugins/stencil-editor/js/*.js
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Run `stencil start` to run a local server so you can start developing your theme
Run with `-o` or `--open` to automatically open up a browser.

- While stencil is running, you can type "rs" and then hit enter to auto-reload all browsers. This is similar to Nodemon's rs option.
- Run with `-e` to load a local Theme Editor.

Run `stencil bundle` to validate your code and create a zip bundle file that can be uploaded to BigCommerce.

Expand Down
3 changes: 0 additions & 3 deletions bin/stencil-start
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Program
.option('-v, --variation [name]', 'Set which theme variation to use while developing')
.option('-t, --test', 'Enable QA mode which will bundle all javascript for speed to test locally')
.option('--tunnel [name]', 'Create a tunnel URL which points to your local server that anyone can use.')
.option('-e, --theme-editor', 'Run Theme Editor server')
.option('-n, --no-cache', 'Turns off caching for API resource data per storefront page. The cache lasts for 5 minutes before automatically refreshing.')
.parse(process.argv);

Expand Down Expand Up @@ -152,8 +151,6 @@ function startServer() {
var params = {
dotStencilFile: dotStencilFile,
variationIndex: themeConfig.variationIndex || 0,
stencilEditorEnabled: Program.themeEditor,
stencilEditorPort: Program.themeEditorPort || 8181,
useCache: Program.cache,
themePath: themePath,
};
Expand Down
25 changes: 2 additions & 23 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ let remote;
let responses;
let targetVersion;

function installPrivateDependencies() {
return gulp.src('package.json')
.pipe(exec('npm run install-private-dependencies'), logError)
.on('error', logError);
}

function bumpTask() {
const questions = [{
type: 'list',
Expand Down Expand Up @@ -94,20 +88,8 @@ function bumpTask() {
.on('error', logError);
}

function deployWebpack() {
return gulp.src('package.json')
.pipe(exec('npm run deploy'), logError)
.on('error', logError);
}

function uninstallPrivateDependencies() {
return gulp.src('package.json')
.pipe(exec('npm run uninstall-private-dependencies'), logError)
.on('error', logError);
}

function pushTask() {
return gulp.src(['package.json', 'package-lock.json', 'CHANGELOG.md', 'server/plugins/stencil-editor/public/dist/app.js', 'server/plugins/stencil-editor/public/dist/ng-stencil-editor/css/ng-stencil-editor.min.css', 'server/plugins/stencil-editor/public/dist/stencil-preview-sdk.js'])
return gulp.src(['package.json', 'package-lock.json', 'CHANGELOG.md'])
// Add files
.pipe(git.add())
// Commit the changed version number
Expand All @@ -127,10 +109,7 @@ function logError(err) {
}
}

gulp.task('install-private-dependencies', installPrivateDependencies);
gulp.task('bump', bumpTask);
gulp.task('deploy-webpack', deployWebpack);
gulp.task('changelog', done => changelog.changelogTask({}, done));
gulp.task('uninstall-private-dependencies', uninstallPrivateDependencies);
gulp.task('push', pushTask);
gulp.task('release', gulp.series('install-private-dependencies', 'bump', 'deploy-webpack', 'changelog', 'uninstall-private-dependencies', 'push'));
gulp.task('release', gulp.series('bump', 'changelog', 'push'));
5 changes: 3 additions & 2 deletions lib/stencil-bundle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';

const MEGABYTE = 1048576;
const MAX_SIZE_BUNDLE = MEGABYTE * 50;
const PATHS_TO_ZIP = [
Expand Down Expand Up @@ -350,7 +351,7 @@ function bundleTaskRunner(callback) {

/**
* Archive theme files
* @param {Archive} archive
* @param {Archiver} archive
* @param {String} themePath
* @param {Object} configuration
*/
Expand All @@ -371,7 +372,7 @@ function bundleThemeFiles(archive, themePath, configuration) {

/**
* Archive all generated files (ex. parsed files)
* @param {Archive} archive
* @param {Archiver} archive
* @param {Object} taskResults
* @returns {Array}
*/
Expand Down
Loading