Comparing version 3.0.0 to 3.0.1
@@ -0,0 +0,0 @@ { |
@@ -7,6 +7,12 @@ ## Changelog | ||
#### 3.0.1 | ||
##### Changed | ||
- Using [next-export](https://github.com/tscanlin/next-export) for deployments now. | ||
#### 3.0.0 | ||
##### **BREAKING CHANGE** | ||
- Switched from using smooth-scroll to [zenzcroll](https://github.com/zengabor/zenscroll) for reasons.. [40](https://github.com/tscanlin/tocbot/issues/40) | ||
- Switched from using smooth-scroll to [zenzcroll](https://github.com/zengabor/zenscroll) for reasons.. [#40](https://github.com/tscanlin/tocbot/issues/40) | ||
@@ -13,0 +19,0 @@ ##### Added |
module.exports = { | ||
assetPrefix: '/tocbot/', | ||
assetPrefix: '/tocbot', | ||
webpack: (webpackConfig) => { | ||
@@ -4,0 +4,0 @@ const newConfig = Object.assign({}, webpackConfig) |
{ | ||
"name": "tocbot", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Generate a table of contents based on the heading structure of a html document.", | ||
@@ -10,3 +10,3 @@ "main": "src/js/index.js", | ||
"build": "npm run clean && npm run mkdir-dist && npm run build-js && npm run build-js-uglify && npm run build-css && npm run build-dist && npm run build-docs", | ||
"build-docs": "npm run build-content && npm run next-export && npm run fix-export", | ||
"build-docs": "npm run build-content && npm run next-export-fix && npm run next-export && npm run fix-jekyll", | ||
"build-css": "node-sass --include-path ./node_modules --output-style compressed -o static/css src/scss", | ||
@@ -20,9 +20,9 @@ "build-css-watch": "node-sass --source-map-embed --watch --include-path ./node_modules --output-style compressed -o static/css src/scss", | ||
"build-content-watch": "processto \"*.md\" --outputDir pages --filenamePrefix _ --watch", | ||
"fix-export": "bash ./script/fix-export.sh", | ||
"estimate-js-size": "gzip -9 -c dist/tocbot.min.js | wc -c", | ||
"estimate-css-size": "gzip -9 -c dist/tocbot.css | wc -c", | ||
"fix-jekyll": "cd site/tocbot && touch .nojekyll", | ||
"lint": "standard --fix", | ||
"dev": "npm run build-css && parallelshell \"npm run next\" \"npm run build-js-watch\" \"npm run build-css-watch\" \"npm run build-content-watch\"", | ||
"start": "npm run dev", | ||
"deploy": "npm run build && gh-pages -d site", | ||
"deploy": "npm run build && gh-pages -d site/tocbot", | ||
"test": "npm run lint && mocha test/index.js", | ||
@@ -33,3 +33,4 @@ "test:debug": "node-debug _mocha --timeout 0 test/index.js", | ||
"next-build": "next build", | ||
"next-export": "next export", | ||
"next-export": "next-export", | ||
"next-export-fix": "next-export-fix", | ||
"next-start": "next start", | ||
@@ -73,3 +74,4 @@ "v-patch": "npm version patch && git push --tags && npm publish", | ||
"eslint": "^3.19.0", | ||
"gh-pages": "^0.12.0", | ||
"fs-extra": "^3.0.1", | ||
"gh-pages": "^1.0.0", | ||
"globby": "^6.1.0", | ||
@@ -81,6 +83,7 @@ "js-yaml": "^3.8.3", | ||
"mocha": "^3.2.0", | ||
"next": "git+https://git@github.com/tscanlin/next.js.git", | ||
"next": "^2.3.1", | ||
"next-export": "^0.1.7", | ||
"node-sass": "^4.5.2", | ||
"parallelshell": "^2.0.0", | ||
"processto": "^1.6.2", | ||
"processto": "^1.8.0", | ||
"react": "^15.5.4", | ||
@@ -87,0 +90,0 @@ "react-dom": "^15.5.4", |
@@ -5,3 +5,3 @@ import React from 'react' | ||
import CONFIG from './config.js' | ||
import CONFIG from './_config.js' | ||
import PAGE_JSON from './_CHANGELOG.json' | ||
@@ -8,0 +8,0 @@ |
@@ -5,3 +5,3 @@ import React from 'react' | ||
import CONFIG from './config.js' | ||
import CONFIG from './_config.js' | ||
import PAGE_JSON from './_README.json' | ||
@@ -8,0 +8,0 @@ |
@@ -0,0 +0,0 @@ <h1 class="dn"> |
@@ -15,6 +15,6 @@ import React from 'react' | ||
props.topLinks.map((link, i) => { | ||
return props.isLive() | ||
return link.href.indexOf('http') === 0 | ||
? ( | ||
<a className='dib f6 white no-underline pa1 ma1' | ||
href={props.getPathPrefix(link.href)} key={i}> | ||
href={link.href} key={i}> | ||
{link.text} | ||
@@ -21,0 +21,0 @@ </a> |
@@ -17,9 +17,2 @@ import React from 'react' | ||
// TODO: Fix this so it works well locally and in prod. | ||
function getPathPrefix (path) { | ||
return path.indexOf('http') !== -1 || path.indexOf('/tocbot') === 0 | ||
? path | ||
: isLive() ? '/tocbot' + path : path | ||
} | ||
function Template (props) { | ||
@@ -33,3 +26,3 @@ return ( | ||
{props.stylesheets && props.stylesheets.length > 0 && props.stylesheets.map((stylesheet, i) => { | ||
return <link key={i} rel='stylesheet' href={getPathPrefix(stylesheet)} /> | ||
return <link key={i} rel='stylesheet' href={stylesheet} /> | ||
})} | ||
@@ -45,4 +38,2 @@ <style>{`.page-content {display:none}`}</style> | ||
topLinks={props.topLinks} | ||
isLive={isLive} | ||
getPathPrefix={getPathPrefix} | ||
/> | ||
@@ -49,0 +40,0 @@ |
@@ -0,0 +0,0 @@ import React from 'react' |
@@ -0,0 +0,0 @@ import React from 'react' |
@@ -0,0 +0,0 @@ import React from 'react' |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ module.exports = { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ module.exports = function () { |
@@ -0,0 +0,0 @@ --- |
@@ -0,0 +0,0 @@ var fs = require('fs') |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94335
27
37
1293