diff options
author | Yukai Huang | 2017-03-28 18:31:36 +0800 |
---|---|---|
committer | Yukai Huang | 2017-03-28 18:31:36 +0800 |
commit | ba1bef015fa2a596c9ba86b935f2d76624f53b9e (patch) | |
tree | 190ec01e724605eed5b6aacd32292dd6efa5f143 /public/js | |
parent | 7637a6a8a650a8247a02a7c2ccaf5d370b3a0625 (diff) |
Update to es6 module import style
Diffstat (limited to '')
-rw-r--r-- | public/js/index.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/public/js/index.js b/public/js/index.js index f1a101ea..b84cc43a 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -12,14 +12,14 @@ require('../css/site.css') require('highlight.js/styles/github-gist.css') -var toMarkdown = require('to-markdown') +import toMarkdown from 'to-markdown' -var saveAs = require('file-saver').saveAs -var randomColor = require('randomcolor') +import { saveAs } from 'file-saver' +import randomColor from 'randomcolor' -var _ = require('lodash') +import _ from 'lodash' -var List = require('list.js') +import List from 'list.js' import { checkLoginStateChanged, @@ -75,8 +75,7 @@ import { removeHistory } from './history' -var renderer = require('./render') -var preventXSS = renderer.preventXSS +import { preventXSS } from './render' import Editor from './lib/editor' import EditorConfig from './lib/editor/config' |