linc-build-ssr
Advanced tools
Comparing version 1.3.5 to 1.4.0
{ | ||
"name": "linc-build-ssr", | ||
"version": "1.3.5", | ||
"version": "1.4.0", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "repository": {}, |
@@ -1,19 +0,29 @@ | ||
const path = require('path'); | ||
const fse = require('fs-extra'); | ||
const path = require('path') | ||
const fse = require('fs-extra') | ||
/** | ||
* Build a site based on the profile provided in package.json. | ||
* @param config | ||
* @param packageJson | ||
* @param callback | ||
*/ | ||
const build = (config, packageJson, callback) => { | ||
const lincConfig = packageJson.linc || {}; | ||
const profile = lincConfig.buildProfile || 'linc-profile-generic-react-redux-routerv3'; | ||
const errorHtmls = lincConfig.errorDir || 'errors'; | ||
const errorSrc = path.resolve(process.cwd(), errorHtmls); | ||
if (fse.pathExistsSync(errorSrc) ){ | ||
const errorDest = path.resolve(process.cwd(), 'dist', 'static', '_errors'); | ||
fse.ensureDir(errorDest); | ||
fse.copySync(errorSrc, errorDest); | ||
} | ||
console.log(`Using build profile: ${profile}`); | ||
const builder = require(path.resolve(process.cwd(), `node_modules/${profile}`)); | ||
builder(callback); | ||
const lincConfig = packageJson.linc || {} | ||
const profile = | ||
lincConfig.buildProfile || 'linc-profile-generic-react-redux-routerv3' | ||
const errorHtmls = lincConfig.errorDir || 'errors' | ||
const errorSrc = path.resolve(process.cwd(), errorHtmls) | ||
if (fse.pathExistsSync(errorSrc)) { | ||
const errorDest = path.resolve(process.cwd(), 'dist', 'static', '_errors') | ||
fse.ensureDir(errorDest) | ||
fse.copySync(errorSrc, errorDest) | ||
} | ||
console.log(`Using build profile: ${profile}`) | ||
const builder = require(path.resolve( | ||
process.cwd(), | ||
`node_modules/${profile}` | ||
)) | ||
return builder({ stdin: process.stdin, stdout: process.stdout }, callback) | ||
} | ||
module.exports = build; | ||
module.exports = build |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1956
27
1