Skip to content

Commit

Permalink
chore(package): update standard to version 11.0.1
Browse files Browse the repository at this point in the history
Merge pull request #44 from JLHwung/greenkeeper/standard-11.0.1
  • Loading branch information
JLHwung committed Mar 15, 2018
1 parent 9d735e0 commit e68823a
Show file tree
Hide file tree
Showing 3 changed files with 402 additions and 331 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"nyc": "^11.0.2",
"pre-commit": "^1.2.2",
"rimraf": "^2.5.4",
"standard": "^10.0.0",
"standard": "^11.0.1",
"tap": "^11.0.1",
"yaspeller-ci": "^1.0.0"
},
Expand Down
10 changes: 5 additions & 5 deletions src/lib/run-sw-precache.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { workerName } from './constants'

const generateSWPrecacheConfig = ({
root,
public_dir,
publicDir,
logger
}, extraSWPrecacheConfig) => {
const hexoPublicDir = 'public'
Expand All @@ -20,7 +20,7 @@ const generateSWPrecacheConfig = ({

const runSWPrecache = function () {
const {
public_dir,
public_dir: publicDir,
config,
log
} = this
Expand All @@ -31,14 +31,14 @@ const runSWPrecache = function () {
} = config

// early return when no index.html presets in public directory
const indexHTMLPath = path.join(public_dir, 'index.html')
const indexHTMLPath = path.join(publicDir, 'index.html')
if (!fs.existsSync(indexHTMLPath)) {
return Promise.resolve()
}

const SWPrecacheConfig = generateSWPrecacheConfig({ root, public_dir, logger: log.info.bind(log) }, offline)
const SWPrecacheConfig = generateSWPrecacheConfig({ root, publicDir, logger: log.info.bind(log) }, offline)

return SWPrecache.write(path.join(public_dir, workerName), SWPrecacheConfig)
return SWPrecache.write(path.join(publicDir, workerName), SWPrecacheConfig)
}

export default runSWPrecache
Loading

0 comments on commit e68823a

Please sign in to comment.