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

Move Advanced Editor to core. #2108

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions plugins/editor/.editorconfig
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 3
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions plugins/editor/.gitignore
@@ -0,0 +1,2 @@
/node_modules/
/bower_components/
6 changes: 6 additions & 0 deletions plugins/editor/.yo-rc.json
@@ -0,0 +1,6 @@
{
"generator-vanilla": {
"preprocessor": "SCSS",
"buildtool": "Grunt"
}
}
91 changes: 91 additions & 0 deletions plugins/editor/Gruntfile.js
@@ -0,0 +1,91 @@
'use strict';

module.exports = function (grunt) {
// Load all Grunt tasks matching the `grunt-*` pattern
require('load-grunt-tasks')(grunt);

// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);

// Load Bower dependencies
var dependencies = require('wiredep')();

grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),

watch: {
bower: {
files: ['bower.json']
, tasks: ['wiredep']
}
, gruntfile: {
files: ['Gruntfile.js']
}
, sass: {
files: ['scss/**/*.scss']
, tasks: ['sass', 'autoprefixer']
}
, livereload: {
options: {
livereload: true
}
, files: [
'design/**/*.css'
, 'design/images/**/*'
, 'js/**/*.js'
, 'views/**/*.tpl'
]
}
},

sass: {
dist: {
options: {
sourceComments: 'map'
}
, files: [{
expand: true
, cwd: 'scss/'
, src: [
'*.scss'
, '!_*.scss'
]
, dest: 'design/'
, ext: '.css'
}]
}
},

autoprefixer: {
dist: {
src: ['design/**/*.css']
}
},

imagemin: {
dist: {
files: [{
expand: true,
cwd: 'design/images',
src: '**/*.{gif,jpeg,jpg,png}',
dest: 'design/images'
}]
}
},

wiredep: {
dist: {
src: ['scss/**/*.scss']
}
}

});

grunt.registerTask('default', [
'wiredep'
, 'sass'
, 'autoprefixer'
, 'imagemin'
]);
};
25 changes: 25 additions & 0 deletions plugins/editor/README.md
@@ -0,0 +1,25 @@
# Advanced Editor

## Compiling assets

The following instructions assume that you have already installed Node.js on your computer. If this is not the case, please download and install the latest stable release from the official [Node.js download page](http://nodejs.org/download/). If you are using [Homebrew](http://brew.sh/), you can also install Node.js via the command line:

```sh
$ brew install node
```

> __Notice__: It is important that you install Node in a way that does not require you to `sudo`.

Once you have Node.js up and running, you will need to install the local dependencies using [npm](npmjs.org):

```sh
$ npm install
```

### Tasks

#### Build - `npm run build`
Compiles all theme assets using Grunt. SCSS stylesheets will be compiled to [`design/custom.css`](design/custom.css) and Javascripts will be concatenated and output to [`js/custom.js`](js/custom.js).

#### Watch - `npm run watch`
Watches the assets for changes and runs the appropriate Grunt tasks. Also starts a Livereload server that will push the changes to your Vanilla installation automatically.
7 changes: 7 additions & 0 deletions plugins/editor/bower.json
@@ -0,0 +1,7 @@
{
"name": "advanced-editor",
"private": true,
"dependencies": {
"bourbon": "~3.2.1"
}
}