diff --git a/README.md b/README.md index b16779de8..9b900a149 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ be authored) are built from models. Models represent rows of content, and can be static or dynamic. For example, the teardown of an article might look like: +**FIXME** this needs to be updated: ``` ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -82,7 +83,7 @@ Visit [http://bustlelabs.github.io/content-kit-editor/demo](http://bustlelabs.gi Running ContentKit tests and demo server locally requires the following dependencies: * [node.js](http://nodejs.org/) ([install package](http://nodejs.org/download/)) or `brew install node` -* `gulp`, via `npm install -g gulp` +* `broccoli`, via `npm install -g broccoli-cli` ### Tests @@ -93,7 +94,8 @@ Install npm and bower: Run tests via the built-in broccoli server: - * `npm run serve && open http://localhost:4200/tests` + * `npm run serve` + * `open http://localhost:4200/tests` Or run tests via testem: @@ -103,20 +105,11 @@ To view the demo: * `broccoli serve` * open http://localhost:4200/demo - * (Note that image uploads and embeds require the demo server to be running) + * (Note that image uploads and embeds are not currently working) +#### To Do -To run the demo server: - -``` -npm start && open http://localhost:5000 -``` - -To ensure ContentKit rebuilds while you work with it: - -``` -gulp watch -``` +Bring back image uploads and embed. Notes below: For uploads and embeds to work, you will have to configure AWS and Embedly keys as environment variables: diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 6911ece67..000000000 --- a/gulpfile.js +++ /dev/null @@ -1,140 +0,0 @@ -var del = require('del'); -var gulp = require('gulp'); -var jshint = require('gulp-jshint'); -var qunit = require('gulp-qunit'); -var less = require('gulp-less'); -var concat = require('gulp-concat'); -var header = require('gulp-header'); -var open = require('gulp-open'); -var uglify = require('gulp-uglify'); -var cssmin = require('gulp-cssmin'); -var file = require('gulp-file'); -var transpile = require('esperanto'); - -// ------------------------------------------- - -var pkg = require('./package.json'); - -var jsSrc = [ - './src/js/**/*.js' -]; - -var jsEntry = './src/js/index.js'; - -var cssSrc = [ - './src/css/variables.less', - './src/css/editor.less', - './src/css/toolbar.less', - './src/css/tooltip.less', - './src/css/embeds.less', - './src/css/message.less', - './src/css/icons.less', - './src/css/animations.less' -]; - -var distDest = './dist/'; -var jsDistName = 'content-kit-editor.js'; -var cssDistName = 'content-kit-editor.css'; -var cssDistPath = distDest + cssDistName; - -var testRunner = './tests/index.html'; -var testScripts = './tests/**/*.js'; -var demo = './demo/index.html'; - -var banner = ['/**', - ' * @overview <%= pkg.name %>: <%= pkg.description %>', - ' * @version <%= pkg.version %>', - ' * @author <%= pkg.author %>', - ' * @license <%= pkg.license %>', - ' */', - ''].join('\n'); - -var iifeHeader = '\n(function(window, document, undefined) {\n\n'; -var iifeFooter = '\n}(this, document));\n'; - -// JSHint javascript code linting -gulp.task('lint', function() { - return gulp.src(jsSrc) - .pipe(jshint('.jshintrc')) - .pipe(jshint.reporter('default')); -}); - -gulp.task('build-js', function() { - return transpile.bundle({ - entry: jsEntry, - resolvePath: function (importee, importer) { - return 'node_modules/' + importee + '.js'; - } - }).then(function(bundle) { - var transpiled = bundle.concat({ - intro: iifeHeader, - outro: iifeFooter - }); - return file(jsDistName, transpiled.code, { src: true }) - .pipe(header(banner, { pkg : pkg } )) - .pipe(gulp.dest(distDest)); - }); -}); - -// Compiles LESS and concatenates css -gulp.task('build-css', function() { - return gulp.src(cssSrc) - .pipe(concat(cssDistName)) - .pipe(less()) - .pipe(gulp.dest(distDest)); -}); - -// Builds the entire suite of js/css -gulp.task('build', ['build-css', 'build-js']); - -// Runs QUnit tests -gulp.task('test', ['build'], function() { - return gulp.src(testRunner).pipe(qunit()); -}); - -// Opens the test runner in your default browser -gulp.task('test-browser', ['build'], function(){ - return gulp.src(testRunner).pipe(open('<% file.path %>')); -}); - -// Opens the demo in your default browser -gulp.task('demo', function(){ - return gulp.src(demo).pipe(open('<% file.path %>')); -}); - -// Removes built output files -gulp.task('clean', function() { - return del([distDest + '*']); -}); - -// Watches when js files change and automatically lints/builds -gulp.task('watch-js', function() { - gulp.watch(jsSrc, ['lint', 'build-js']); -}); - -// Watches test files change and automatically tests -gulp.task('watch-tests', function() { - gulp.watch(testScripts, ['test']); -}); - -// Watches when css files change and automatically builds -gulp.task('watch-css', function() { - gulp.watch(cssSrc, ['build-css']); -}); - -// Watches when any files change and automatically tests/builds -gulp.task('watch', ['watch-js', 'watch-tests', 'watch-css']); - -// Default task -gulp.task('default', ['lint', 'build', 'test']); - -// Deploy task -gulp.task('deploy', ['clean', 'build'], function() { - gulp.src(jsDistPath) - .pipe(uglify()) - .pipe(gulp.dest(distDest)); - - gulp.src(cssDistPath) - .pipe(cssmin()) - .pipe(gulp.dest(distDest)); -}); diff --git a/package.json b/package.json index 64e2f6e33..c6c4c6f64 100644 --- a/package.json +++ b/package.json @@ -44,18 +44,6 @@ "broccoli-multi-builder": "^0.2.5", "broccoli-test-builder": "^0.1.0", "content-kit-utils": "^0.2.0", - "del": "^1.1.1", - "esperanto": "^0.6.32", - "gulp": "^3.8.11", - "gulp-concat": "~2.1.7", - "gulp-cssmin": "^0.1.6", - "gulp-file": "^0.2.0", - "gulp-header": "^1.2.2", - "gulp-jshint": "~1.3.4", - "gulp-less": "^1.3.1", - "gulp-open": "^0.2.8", - "gulp-qunit": "^1.2.1", - "gulp-uglify": "^1.1.0", "jquery": "^2.1.4", "mobiledoc-dom-renderer": "^0.1.3", "mobiledoc-html-renderer": "^0.1.0",