Commit d1f4f0ed authored by julientaq's avatar julientaq

fix starting point and readme

parent 820ea40e
# This is a template for building books with paged.js
Readme is in construction, have a look to package.json for the CLI possible script
\ No newline at end of file
Readme is in construction, have a look to package.json for the CLI possible script
1. install node
2. in the terminal, in the folder, run `npm run kickstart`
3. when it’s done, run `npm run start` and in the browser you can open `localhost:9000/book.html`
\ No newline at end of file
......@@ -141,20 +141,20 @@
"dev": true
},
"@babel/polyfill": {
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.3.tgz",
"integrity": "sha512-rkv8WIvJshA5Ev8iNMGgz5WZkRtgtiPexiT7w5qevGTuT7ZBfM3de9ox1y9JR5/OXb/sWGBbWlHNa7vQKqku3Q==",
"version": "7.8.7",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.8.7.tgz",
"integrity": "sha512-LeSfP9bNZH2UOZgcGcZ0PIHUt1ZuHub1L3CVmEyqLxCeDLm4C5Gi8jRH8ZX2PNpDhQCo0z6y/+DIs2JlliXW8w==",
"requires": {
"core-js": "^2.6.5",
"regenerator-runtime": "^0.13.2"
"regenerator-runtime": "^0.13.4"
}
},
"@babel/runtime": {
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz",
"integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==",
"version": "7.8.7",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.7.tgz",
"integrity": "sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg==",
"requires": {
"regenerator-runtime": "^0.13.2"
"regenerator-runtime": "^0.13.4"
}
},
"@babel/template": {
......@@ -1109,9 +1109,9 @@
"dev": true
},
"core-js": {
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz",
"integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A=="
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
},
"core-util-is": {
"version": "1.0.2",
......@@ -1178,12 +1178,19 @@
}
},
"css-tree": {
"version": "1.0.0-alpha.29",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz",
"integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==",
"version": "1.0.0-alpha.39",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz",
"integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==",
"requires": {
"mdn-data": "~1.1.0",
"source-map": "^0.5.3"
"mdn-data": "2.0.6",
"source-map": "^0.6.1"
},
"dependencies": {
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
}
}
},
"cssnano-util-same-parent": {
......@@ -1193,11 +1200,12 @@
"dev": true
},
"d": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
"requires": {
"es5-ext": "^0.10.9"
"es5-ext": "^0.10.50",
"type": "^1.0.1"
}
},
"debug": {
......@@ -1365,13 +1373,13 @@
}
},
"es5-ext": {
"version": "0.10.49",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.49.tgz",
"integrity": "sha512-3NMEhi57E31qdzmYp2jwRArIUsj1HI/RxbQ4bgnSB+AIKIxsAmTiK83bYMifIcpWvEc3P1X30DhUKOqEtF/kvg==",
"version": "0.10.53",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
"integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
"requires": {
"es6-iterator": "~2.0.3",
"es6-symbol": "~3.1.1",
"next-tick": "^1.0.0"
"es6-symbol": "~3.1.3",
"next-tick": "~1.0.0"
}
},
"es6-iterator": {
......@@ -1391,12 +1399,12 @@
"dev": true
},
"es6-symbol": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
"integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
"requires": {
"d": "1",
"es5-ext": "~0.10.14"
"d": "^1.0.1",
"ext": "^1.1.2"
}
},
"escape-string-regexp": {
......@@ -1485,6 +1493,21 @@
"os-homedir": "^1.0.1"
}
},
"ext": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz",
"integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==",
"requires": {
"type": "^2.0.0"
},
"dependencies": {
"type": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz",
"integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow=="
}
}
},
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
......@@ -3072,7 +3095,8 @@
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
"dev": true
},
"lodash.memoize": {
"version": "4.1.2",
......@@ -3174,9 +3198,9 @@
"dev": true
},
"mdn-data": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz",
"integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA=="
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz",
"integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA=="
},
"mem": {
"version": "4.3.0",
......@@ -3641,15 +3665,14 @@
"dev": true
},
"pagedjs": {
"version": "0.1.33",
"resolved": "https://registry.npmjs.org/pagedjs/-/pagedjs-0.1.33.tgz",
"integrity": "sha512-ZLLP+nBNlPXxSsWkREPbbs/03LphqKI4wBPEEVuYr/UHKltf5Jh3FDnArgqSlZB6jd6YjNGvG6C+GBI+gFAlEw==",
"requires": {
"@babel/polyfill": "^7.0.0",
"@babel/runtime": "^7.2.0",
"css-tree": "1.0.0-alpha.29",
"event-emitter": "^0.3.5",
"lodash": "^4.17.11"
"version": "0.1.39",
"resolved": "https://registry.npmjs.org/pagedjs/-/pagedjs-0.1.39.tgz",
"integrity": "sha512-Kl+cl+jtuMEUhHO8s/DLld4ok9CK//M64DuIeQsdVHfNp289JxCRK/KoZiSPhAjTqsLBZMMWbdJyuIxJnDO17Q==",
"requires": {
"@babel/polyfill": "^7.8.3",
"@babel/runtime": "^7.8.4",
"css-tree": "1.0.0-alpha.39",
"event-emitter": "^0.3.5"
}
},
"parse-json": {
......@@ -4403,9 +4426,9 @@
}
},
"regenerator-runtime": {
"version": "0.13.2",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz",
"integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA=="
"version": "0.13.4",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz",
"integrity": "sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g=="
},
"regex-not": {
"version": "1.0.2",
......@@ -4785,7 +4808,8 @@
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
},
"source-map-resolve": {
"version": "0.5.2",
......@@ -5152,6 +5176,11 @@
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
"dev": true
},
"type": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
},
"unc-path-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
......
......@@ -8,15 +8,13 @@
"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",
"copy:html": "copy 'src/content/**/*' dist/",
"copy:img": "copy 'src/images/**' 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:*"
"start": "npm-run-all -s copy:* build:css -p serve watch:*"
},
"author": "julientaq",
"license": "MIT",
......@@ -44,6 +42,6 @@
},
"dependencies": {
"hyphenopoly": "^3.0.1",
"pagedjs": "^0.1.33"
"pagedjs": "^0.1.39"
}
}
......@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8" />
<title>A book with paged.js is worth a thousand words</title>
<link href="css/main.css" rel="stylesheet" />
<link href="css/book.css" rel="stylesheet" />
<script>
var Hyphenopoly = {
require: {
......@@ -48,9 +48,8 @@
<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>
<p>This is where you can add your content</p>
</section>
</body>
......
body {
color: red;
}
\ No newline at end of file
@import "screen/interface.css";
/* add your css here */
/* To define how the book look on the screen: */
:root {
--color-paper: white;
--color-pageBox: grey;
}
@media screen {
body {
background-color: var(--color-background);
}
.pagedjs_pages {
display: flex;
width: calc(var(--pagedjs-pagebox-width) * 2);
flex: 0;
flex-wrap: wrap;
margin: 0 auto;
margin-bottom: 3em;
}
.pagedjs_page {
background-color: var(--color-paper);
box-shadow: 0 0 0 2px var(--color-pageBox);
margin: 0;
flex-shrink: 0;
flex-grow: 0;
margin-top: 10mm;
}
.pagedjs_first_page {
margin-left: var(--pagedjs-pagebox-width);
}
.pagedjs_page > [class*="pagedjs_margin"] {
box-shadow: 0 0 0 1px var(--color-marginBox);
}
/* uncomment for recto/verso book.
--------------------------------------------------- */
/* .pagedjs_pages {
flex-direction: column;
width: 100%;
}
.pagedjs_first_page {
margin-left: 0;
}
.pagedjs_page {
margin: 0 auto;
margin-top: 10mm;
} */
}
\ 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