Commit 05fef1f9 authored by julientaq's avatar julientaq

initial commit

parents
This diff is collapsed.
{
"name": "book-template",
"version": "0.0.1",
"description": "book template for pagedjs",
"main": "index.js",
"scripts": {
"kickstart": "npm install pagedjs && copy 'node_modules/pagedjs/dist/*' 'dist/js/pagedjs' && copy 'node_modules/hyphenopoly/**' 'dist/js/hyphenopoly/'",
"build:css": "postcss src/css/book.css -o dist/css/book.css",
"copy": "run-p copy:*",
"copy:js": "copy 'src/js/**' dist/js",
"copy:html": "copy 'src/content/**/*.html' dist/",
"copy:img": "copy 'src/img/**' dist/img",
"copy:fonts": "copy 'src/fonts/**' dist/fonts",
"serve": "serve -p 9000 dist",
"watch:copy": "onchange 'src/**/*' -- npm run copy",
"watch:css": "npm run build:css -- --watch",
"pagedjs-update": "npm install pagedjs && copy 'node_modules/pagedjs/dist/*' 'dist/js/pagedjs'",
"hyphenopoly": "npm install hyphenopoly && copy 'node_modules/hyphenopoly/**' 'dist/js/hyphenopoly/'",
"start": "npm-run-all -s copy:* -p serve watch:*"
},
"author": "julientaq",
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.4.3",
"@babel/core": "^7.4.3",
"autoprefixer-core": "^6.0.1",
"copy": "^0.3.2",
"npm-run-all": "^4.1.5",
"onchange": "^5.1.3",
"pixrem": "^4.0.1",
"postcss-center": "^1.1.0",
"postcss-cli": "^6.0.1",
"postcss-color-function": "^4.0.1",
"postcss-color-rgba-fallback": "^3.0.0",
"postcss-css-variables": "^0.9.0",
"postcss-discard-comments": "^4.0.0",
"postcss-font-magician": "^2.2.1",
"postcss-import": "^11.1.0",
"postcss-merge-rules": "^4.0.0",
"postcss-nested": "^3.0.0",
"postcss-simple-extend": "^1.0.0",
"postcss-simple-vars": "^4.1.0",
"serve": "^11.0.0"
},
"dependencies": {
"hyphenopoly": "^3.0.1",
"pagedjs": "^0.1.33"
}
}
module.exports = {
map: {
inline: false,
annotation: 'dist/css/maps/'
},
plugins: [
require('postcss-import')(),
// require('postcss-css-variables')(),
require('pixrem')(),
require('postcss-color-function')(),
require('postcss-nested')(),
require('postcss-merge-rules')(),
// require('autoprefixer-core')('last 1 version'),
require('postcss-discard-comments')({
removeAll: true
}),
// require('cssnano')()
]
};
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>A book with paged.js is worth a thousand words</title>
<link href="css/main.css" rel="stylesheet" />
<script>
var Hyphenopoly = {
require: {
"en-us": "FORCEHYPHENOPOLY"
},
paths: {
patterndir: "./js/hyphenopoly/patterns/",
maindir: "./js/hyphenopoly/"
},
setup: {
// set the language for the content
defaultLanguage: "en-us",
dontHyphenateClass: "noHyphen",
safeCopy: true,
// timeOut: 1000,
hide: "none",
selectors: {
"p, li, blockquote": {
}
}
},
handleEvent: {
hyphenopolyEnd: function (e) {
window.PagedPolyfill.preview();
}
}
}
window.PagedConfig = {
auto: false
}
</script>
<script src="js/hyphenopoly/Hyphenopoly_Loader.js"></script>
<script src="js/pagedjs/paged.polyfill.js"></script>
<script src="js/book.js"></script>
</head>
<body>
<section class="cover">
<h1>book title</h1>
</section>
<section>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Numquam enim repudiandae natus veritatis tempora repellendus suscipit ex illo eaque ab.
</p>
</section>
</body>
</html>
\ No newline at end of file
body {
color: red;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment