Skip to content

Commit

Permalink
fix demo to run as local file without needing to start the server
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoitch committed Sep 30, 2014
1 parent d4661eb commit dfbbaac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 27 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# ContentKit-Editor [![Build Status](https://travis-ci.org/ContentKit/content-kit-editor.svg?branch=master)](https://travis-ci.org/ContentKit/content-kit-editor)

A modern, minimalist WYSIWYG editor.
### A modern, minimalist WYSIWYG editor.

![screenshot]
(https://rawgit.com/ContentKit/content-kit-editor/master/screenshot.png)

*ContentKit-Editor is currently under heavy active development. API subject to change.*
*Currently under heavy active development. API subject to change.*

## Building
1. Install dependencies: `npm install`
2. Build: `gulp build`
## Prerequisites
* [node.js](http://nodejs.org/) ([install package](http://nodejs.org/download/)) or `brew install node`

## Configuration (optional)
For embeds and image uploads, you will have to configure the built-in server:
Rename `server/config.example.json` to `server/config.json` and enter your AWS credentials in the file.

## Playing
1. Build
2. Copy or rename `server/config.example.json` to `server/config.json`. Then optionally add your credentials to the file for image uploading and embedding.
3. Start the server: `npm start`
4. Navigate to the demo at [http://localhost:5000](http://localhost:5000)
1. Install dependencies: `npm install`
2. Build: `gulp build`
3. Start server: `npm start` then visit [http://localhost:5000](http://localhost:5000) || To play without the server, simply open [demo/index.html](demo/index.html)

## Testing
`gulp test`

## Dev tips
- `gulp watch` to auto build/test as you save files

---
4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>ContentKit Editor</title>

<!-- Include ContentKit Editor CSS -->
<link href="content-kit-editor.css" rel="stylesheet">
<link href="../dist/content-kit-editor.css" rel="stylesheet">

<!-- CSS just for the demo page -->
<link href="demo.css" rel="stylesheet">
Expand Down Expand Up @@ -69,7 +69,7 @@ <h3>Keyboard shortcuts:</h3>
</div>

<!-- Include ContentKit JS -->
<script src="content-kit-editor.js"></script>
<script src="../dist/content-kit-editor.js"></script>
<!-- Initialize a new Editor -->
<script>var editor = new ContentKit.Editor('.editor');</script>

Expand Down
3 changes: 1 addition & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ var app = express();

// Demo setup
app.use(express.static('demo'));
app.use(express.static('dist'));
app.use(express.static('ext'));
app.use('/dist', express.static('dist'));
app.get('/', function(req, res) {
res.sendFile('/');
});
Expand Down
11 changes: 0 additions & 11 deletions src/js/content-kit-editor/utils/event-delegate.js

This file was deleted.

0 comments on commit dfbbaac

Please sign in to comment.