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

v4.0.0 #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/build/
/node_modules/
/bower_components/
/vendor/
/examples/build.js
/examples/build.js.map
.tern-port
.npm-debug.log
.DS_Store
Expand Down
4 changes: 2 additions & 2 deletions .tern-project
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"requirejs": {
"baseURL": "./src",
"paths": {
"html-janitor": "./bower_components/html-janitor/src/html-janitor",
"lodash-amd": "../bower_components/lodash-amd"
"html-janitor": "./node_modules/html-janitor/src/html-janitor",
"lodash-amd": "../node_modules/lodash-amd"
}
},
"node": {}
Expand Down
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
language: node_js

node_js:
- "5.11"
- "6.11"

sudo: false

cache:
directories:
- node_modules
- bower_components

before_script:
- npm install -g bower
- bower install
- npm install
script: TEST_SERVER_PORT=8090 npm test
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 4.0.0

- Builds using [webpack](https://webpack.js.org/)
- Switches to [npm](https://npmjs.com)-only dependency management and publishing, removing [bower](https://bower.io/) support.
- Updates dependencies

These changes are the first in a wide-ranging modernisation process that scribe will be going through.

# 3.3.0

Merges a range of bug fixes including removing the dependency on lodash, use of ES6 `const` not inserting `<br>` tags into custom elements and a sanity check to ensure a `listElement` exists before inserting a list.
Expand Down
22 changes: 14 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,18 @@ Please see the [wiki](https://github.com/guardian/scribe/wiki/Testing) for detai

## Releasing

### npm
* `git checkout master`.
* Update `CHANGELOG.md`
* Update the version number in `package.json`
* Commit with message of `v<number>`
* `git push`
* Run `npm publish`

### Bower

** NOTE: as of version 4.0.0, Scribe is no longer distributed via Bower. **

* `git checkout master`
* Run `./release.sh [ <newversion> | major | minor | patch | build ]` (we use
[mversion](https://github.com/mikaelbr/mversion#usage-cli)). (If releasing a
Expand All @@ -30,15 +41,10 @@ Please see the [wiki](https://github.com/guardian/scribe/wiki/Testing) for detai
If you are, run `git push; git push --tags`. (The `dist` tree is for
distribution via Bower).

### npm
* `git checkout master`.
* Update `CHANGELOG.md`
* Update the version number in `package.json`
* Commit with message of `v<number>`
* `git push`
* Run `npm publish`

### Update example

** NOTE: as of version 4.0.0, Scribe is no longer distributed via Bower. **

* `git checkout gh-pages`
* `git pull`
* Update necessary dependency versions in `bower.json`. Check `bower ls` to see
Expand Down
50 changes: 0 additions & 50 deletions Gruntfile.js

This file was deleted.

41 changes: 0 additions & 41 deletions Plumbing.js

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Scribe patches [many browser inconsistencies][browser inconsistencies] in the [n

## Installation
```
bower install scribe
npm install scribe-editor
```

Alternatively, you can [access the distribution files through GitHub releases](https://github.com/guardian/scribe/releases).
Expand All @@ -58,7 +58,7 @@ require(['scribe', 'scribe-plugin-blockquote-command', 'scribe-plugin-toolbar'],
You can [see a live example here][example], or [view the code here](https://github.com/guardian/scribe).

Also be sure to check the [`examples`](./examples) directory for an
AMD syntax example as well as a CommonJS (browserify) example.
AMD syntax example as well as a CommonJS example.

## Options

Expand Down
16 changes: 0 additions & 16 deletions bower.json

This file was deleted.

5 changes: 2 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
machine:
node:
version: 5
version: 6

dependencies:
pre:
- npm install -g bower
- bower install
- npm install
- ./setup.sh
26 changes: 13 additions & 13 deletions examples/amd-inline.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
editor using RequireJS and the AMD module syntax.

Note that you'll need to install scribe's dependencies through
`bower install`. See http://bower.io/ if you are unfamiliar.
`npm install`. See http://npmjs.com if you are unfamiliar.
-->
<style>
button {
Expand Down Expand Up @@ -32,24 +32,24 @@
height: 10em;
}
</style>
<script src="../bower_components/requirejs/require.js"></script>
<script src="../node_modules/requirejs/require.js"></script>
<script>
require({
paths: {
'scribe-common': '../bower_components/scribe-common',
'lodash-amd': '../bower_components/lodash-amd',
'html-janitor': '../bower_components/html-janitor/html-janitor',
'immutable': '../bower_components/immutable/dist/immutable'
'scribe-common': '../node_modules/scribe-common',
'lodash-amd': '../node_modules/lodash-amd',
'html-janitor': '../node_modules/html-janitor/src/html-janitor',
'immutable': '../node_modules/immutable/dist/immutable'
}
}, [
'../src/scribe',
'../bower_components/scribe-plugin-toolbar/src/scribe-plugin-toolbar',
'../bower_components/scribe-plugin-formatter-plain-text-convert-new-lines-to-html/src/scribe-plugin-formatter-plain-text-convert-new-lines-to-html',
'../bower_components/scribe-plugin-sanitizer/src/scribe-plugin-sanitizer',
'../bower_components/scribe-plugin-inline-styles-to-elements/src/scribe-plugin-inline-styles-to-elements',
'../bower_components/scribe-plugin-heading-command/src/scribe-plugin-heading-command',
'../bower_components/scribe-plugin-link-prompt-command/src/scribe-plugin-link-prompt-command',
'../bower_components/scribe-plugin-blockquote-command/src/scribe-plugin-blockquote-command'
'../node_modules/scribe-plugin-toolbar/src/scribe-plugin-toolbar',
'../node_modules/scribe-plugin-formatter-plain-text-convert-new-lines-to-html/src/scribe-plugin-formatter-plain-text-convert-new-lines-to-html',
'../node_modules/scribe-plugin-sanitizer/src/scribe-plugin-sanitizer',
'../node_modules/scribe-plugin-inline-styles-to-elements/src/scribe-plugin-inline-styles-to-elements',
'../node_modules/scribe-plugin-heading-command/src/scribe-plugin-heading-command',
'../node_modules/scribe-plugin-link-prompt-command/src/scribe-plugin-link-prompt-command',
'../node_modules/scribe-plugin-blockquote-command/src/scribe-plugin-blockquote-command'

], function (
Scribe,
Expand Down
26 changes: 13 additions & 13 deletions examples/amd.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
editor using RequireJS and the AMD module syntax.

Note that you'll need to install scribe's dependencies through
`bower install`. See http://bower.io/ if you are unfamiliar.
`npm install`. See https://npmjs.com/ if you are unfamiliar.
-->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

Expand Down Expand Up @@ -34,24 +34,24 @@
height: 10em;
}
</style>
<script src="../bower_components/requirejs/require.js"></script>
<script src="../node_modules/requirejs/require.js"></script>
<script>
require({
paths: {
'scribe-common': '../bower_components/scribe-common',
'lodash-amd': '../bower_components/lodash-amd',
'html-janitor': '../bower_components/html-janitor/html-janitor',
'immutable': '../bower_components/immutable/dist/immutable'
'scribe-common': '../node_modules/scribe-common',
'lodash-amd': '../node_modules/lodash-amd',
'html-janitor': '../node_modules/html-janitor/src/html-janitor',
'immutable': '../node_modules/immutable/dist/immutable'
}
}, [
'../src/scribe',
'../bower_components/scribe-plugin-toolbar/src/scribe-plugin-toolbar',
'../bower_components/scribe-plugin-formatter-plain-text-convert-new-lines-to-html/src/scribe-plugin-formatter-plain-text-convert-new-lines-to-html',
'../bower_components/scribe-plugin-sanitizer/src/scribe-plugin-sanitizer',
'../bower_components/scribe-plugin-inline-styles-to-elements/src/scribe-plugin-inline-styles-to-elements',
'../bower_components/scribe-plugin-heading-command/src/scribe-plugin-heading-command',
'../bower_components/scribe-plugin-link-prompt-command/src/scribe-plugin-link-prompt-command',
'../bower_components/scribe-plugin-blockquote-command/src/scribe-plugin-blockquote-command'
'../node_modules/scribe-plugin-toolbar/src/scribe-plugin-toolbar',
'../node_modules/scribe-plugin-formatter-plain-text-convert-new-lines-to-html/src/scribe-plugin-formatter-plain-text-convert-new-lines-to-html',
'../node_modules/scribe-plugin-sanitizer/src/scribe-plugin-sanitizer',
'../node_modules/scribe-plugin-inline-styles-to-elements/src/scribe-plugin-inline-styles-to-elements',
'../node_modules/scribe-plugin-heading-command/src/scribe-plugin-heading-command',
'../node_modules/scribe-plugin-link-prompt-command/src/scribe-plugin-link-prompt-command',
'../node_modules/scribe-plugin-blockquote-command/src/scribe-plugin-blockquote-command'

], function (
Scribe,
Expand Down
18 changes: 9 additions & 9 deletions examples/build-cjs.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
cd ..
command -v browserify >/dev/null 2>&1 || { echo >&2 "browserify not installed. run 'npm install -g browserify'. Aborting."; exit 1; }
bower install
npm install deamdify
npm install
npm install scribe-plugin-toolbar
browserify -g deamdify \
-r ./bower_components/immutable/dist/immutable.js:immutable \
-r ./bower_components/lodash-amd/modern/object/assign.js:lodash-amd/modern/object/assign \
-r ./bower_components/lodash-amd/modern/object/defaults.js:lodash-amd/modern/object/defaults \
-r ./bower_components/lodash-amd/modern/string/escape.js:lodash-amd/modern/string/escape \
examples/cjs.js > examples/build.js
webpack \
./examples/cjs.js \
./node_modules/immutable/dist/immutable.js \
./node_modules/lodash-amd/modern/object/assign.js \
./node_modules/lodash-amd/modern/object/defaults.js \
./node_modules/lodash-amd/modern/string/escape.js \
./examples/build.js \
--config ./webpack.conf.js
26 changes: 13 additions & 13 deletions examples/build.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
editor using RequireJS and the AMD module syntax.

Note that you'll need to install scribe's dependencies through
`bower install`. See http://bower.io/ if you are unfamiliar.
`npm install`. See https://npmjs.com/ if you are unfamiliar.
-->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style>
Expand Down Expand Up @@ -33,25 +33,25 @@
height: 10em;
}
</style>
<script src="../bower_components/requirejs/require.js"></script>
<script src="../node_modules/requirejs/require.js"></script>
<script>
require({
paths: {
'scribe-common': '../bower_components/scribe-common',
'lodash-amd': '../bower_components/lodash-amd',
'html-janitor': '../bower_components/html-janitor/html-janitor',
'immutable': '../bower_components/immutable/dist/immutable',
'scribe-common': '../node_modules/scribe-common',
'lodash-amd': '../node_modules/lodash-amd',
'html-janitor': '../node_modules/html-janitor/src/html-janitor',
'immutable': '../node_modules/immutable/dist/immutable',
'scribe': '../build/scribe'
}
}, [
'scribe',
'../bower_components/scribe-plugin-toolbar/src/scribe-plugin-toolbar',
'../bower_components/scribe-plugin-formatter-plain-text-convert-new-lines-to-html/src/scribe-plugin-formatter-plain-text-convert-new-lines-to-html',
'../bower_components/scribe-plugin-sanitizer/src/scribe-plugin-sanitizer',
'../bower_components/scribe-plugin-inline-styles-to-elements/src/scribe-plugin-inline-styles-to-elements',
'../bower_components/scribe-plugin-heading-command/src/scribe-plugin-heading-command',
'../bower_components/scribe-plugin-link-prompt-command/src/scribe-plugin-link-prompt-command',
'../bower_components/scribe-plugin-blockquote-command/src/scribe-plugin-blockquote-command'
'../node_modules/scribe-plugin-toolbar/src/scribe-plugin-toolbar',
'../node_modules/scribe-plugin-formatter-plain-text-convert-new-lines-to-html/src/scribe-plugin-formatter-plain-text-convert-new-lines-to-html',
'../node_modules/scribe-plugin-sanitizer/src/scribe-plugin-sanitizer',
'../node_modules/scribe-plugin-inline-styles-to-elements/src/scribe-plugin-inline-styles-to-elements',
'../node_modules/scribe-plugin-heading-command/src/scribe-plugin-heading-command',
'../node_modules/scribe-plugin-link-prompt-command/src/scribe-plugin-link-prompt-command',
'../node_modules/scribe-plugin-blockquote-command/src/scribe-plugin-blockquote-command'

], function (
Scribe,
Expand Down
2 changes: 1 addition & 1 deletion examples/cjs.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
This example demonstrates how to consume the Scribe
editor using `browserify` and CommonJS module syntax.
editor using `webpack` and CommonJS module syntax.

Note that you'll need to install scribe's dependencies
through `npm install`. `npm` is installed with Node.js.
Expand Down
Loading