@anephenix/rcg
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -5,3 +5,3 @@ module.exports = { | ||
es6: true, | ||
jest: true, | ||
mocha: true, | ||
node: true, | ||
@@ -8,0 +8,0 @@ }, |
# CHANGELOG | ||
### 0.0.10 - Wednesday 27th October, 2021 | ||
- The source folder(s) are generated in case they do not exist already. | ||
- Generate components that support Next.js' built-in support for SCSS. | ||
### 0.0.9 - Thursday 21st May, 2020 | ||
@@ -4,0 +9,0 @@ |
@@ -16,3 +16,4 @@ // NPM Dependencies | ||
customJSExtension, | ||
customCssExtension | ||
customCssExtension, | ||
nextjsSassSupport | ||
) => { | ||
@@ -29,2 +30,3 @@ const title = to.pascal(componentName); | ||
customCssExtension, | ||
nextjsSassSupport, | ||
}); | ||
@@ -31,0 +33,0 @@ return filesCreated; |
@@ -25,8 +25,16 @@ // NPM Dependencies | ||
customDOM, | ||
customCssExtension | ||
customCssExtension, | ||
nextjsSassSupport | ||
) => { | ||
let element = `<div id='${folderName}' />`; | ||
if (nextjsSassSupport) element = `<div id={styles['${folderName}']} />`; | ||
if (customDOM) element = `<div id='${folderName}'>${customDOM}</div>`; | ||
if (customDOM && nextjsSassSupport) | ||
element = `<div id={styles['${folderName}']}>${customDOM}</div>`; | ||
const nextJsStylesVariable = nextjsSassSupport ? 'styles from ' : ''; | ||
const fileExtension = nextjsSassSupport | ||
? 'module.scss' | ||
: customCssExtension; | ||
return ` | ||
import './${title}.${customCssExtension}'; | ||
import ${nextJsStylesVariable}'./${title}.${fileExtension}'; | ||
@@ -57,2 +65,3 @@ const ${title} = () => (${element}); | ||
describe('${title}', () => { | ||
${title}; | ||
test.todo('should do something'); | ||
@@ -72,2 +81,3 @@ });`; | ||
customCssExtension, | ||
nextjsSassSupport, | ||
}) => { | ||
@@ -80,3 +90,4 @@ if (!customJSExtension) customJSExtension = 'js'; | ||
customDOM, | ||
customCssExtension | ||
customCssExtension, | ||
nextjsSassSupport | ||
); | ||
@@ -105,4 +116,7 @@ return await createFile(folderPath, fileName, fileContent); | ||
customCssExtension, | ||
nextjsSassSupport, | ||
}) => { | ||
const fileName = `${title}.${customCssExtension || 'scss'}`; | ||
const fileName = `${title}.${ | ||
nextjsSassSupport ? 'module.scss' : customCssExtension || 'scss' | ||
}`; | ||
const fileContent = getFileContentForStyleFile(folderName, customCSS); | ||
@@ -109,0 +123,0 @@ return await createFile(folderPath, fileName, fileContent); |
@@ -31,5 +31,6 @@ // NPM Dependencies | ||
customCssExtension, | ||
nextjsSassSupport, | ||
}) => { | ||
const folderPath = path.join(srcFolderPath, folderName); | ||
await mkdir(folderPath); | ||
await mkdir(folderPath, { recursive: true }); | ||
const filesCreated = []; | ||
@@ -42,2 +43,3 @@ const styleFilePath = await generateStyleFile({ | ||
customCssExtension, | ||
nextjsSassSupport, | ||
}); | ||
@@ -51,2 +53,3 @@ const componentFilePath = await generateComponentFile({ | ||
customCssExtension, | ||
nextjsSassSupport, | ||
}); | ||
@@ -53,0 +56,0 @@ const testFilePath = await generateTestFile({ |
{ | ||
"name": "@anephenix/rcg", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "React Component Generator", | ||
@@ -8,4 +8,5 @@ "main": "index.js", | ||
"lint": "npx eslint .", | ||
"cover": "jest --coverage --coverageReporters=text-lcov | coveralls", | ||
"test": "jest --coverage" | ||
"cover": "npx nyc npm run test", | ||
"coveralls": "npx nyc --reporter=text-lcov npm run test | coveralls", | ||
"test": "npx mocha test/**/*" | ||
}, | ||
@@ -25,15 +26,16 @@ "keywords": [ | ||
"devDependencies": { | ||
"coveralls": "^3.1.0", | ||
"eslint": "^7.0.0", | ||
"eslint-plugin-jest": "^23.13.1", | ||
"jest": "^26.0.1", | ||
"jsdoc": "^3.6.4", | ||
"npm-upgrade": "^2.0.3", | ||
"coveralls": "^3.1.1", | ||
"eslint": "^7.32.0", | ||
"eslint-plugin-jest": "^24.5.2", | ||
"jsdoc": "^3.6.7", | ||
"mocha": "^9.1.3", | ||
"npm-upgrade": "^3.0.0", | ||
"pre-commit": "^1.2.2", | ||
"prettier": "^2.0.5" | ||
"prettier": "^2.4.1" | ||
}, | ||
"dependencies": { | ||
"commander": "^5.1.0", | ||
"commander": "^7.0.0", | ||
"nyc": "^15.1.0", | ||
"to-case": "^2.0.0" | ||
} | ||
} |
@@ -6,4 +6,3 @@ # RCG | ||
[![npm version](https://badge.fury.io/js/%40anephenix%2Frcg.svg)](https://badge.fury.io/js/%40anephenix%2Frcg) | ||
[![CircleCI](https://circleci.com/gh/anephenix/rcg.svg?style=shield)](https://circleci.com/gh/anephenix/rcg) | ||
[![CI](https://github.com/anephenix/rcg/actions/workflows/node.js.yml/badge.svg)](https://github.com/anephenix/rcg/actions/workflows/node.js.yml) | ||
[![Coverage Status](https://coveralls.io/repos/github/anephenix/rcg/badge.svg?branch=master)](https://coveralls.io/github/anephenix/rcg?branch=master) | ||
@@ -10,0 +9,0 @@ [![Maintainability](https://api.codeclimate.com/v1/badges/67061d6077ef7ceaa0c9/maintainability)](https://codeclimate.com/github/anephenix/rcg/maintainability) |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
39656
3
18
965
144
5
2
+ Addednyc@^15.1.0
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.24.7(transitive)
+ Added@babel/compat-data@7.25.4(transitive)
+ Added@babel/core@7.25.2(transitive)
+ Added@babel/generator@7.25.6(transitive)
+ Added@babel/helper-compilation-targets@7.25.2(transitive)
+ Added@babel/helper-module-imports@7.24.7(transitive)
+ Added@babel/helper-module-transforms@7.25.2(transitive)
+ Added@babel/helper-simple-access@7.24.7(transitive)
+ Added@babel/helper-string-parser@7.24.8(transitive)
+ Added@babel/helper-validator-identifier@7.24.7(transitive)
+ Added@babel/helper-validator-option@7.24.8(transitive)
+ Added@babel/helpers@7.25.6(transitive)
+ Added@babel/highlight@7.24.7(transitive)
+ Added@babel/parser@7.25.6(transitive)
+ Added@babel/template@7.25.0(transitive)
+ Added@babel/traverse@7.25.6(transitive)
+ Added@babel/types@7.25.6(transitive)
+ Added@istanbuljs/load-nyc-config@1.1.0(transitive)
+ Added@istanbuljs/schema@0.1.3(transitive)
+ Added@jridgewell/gen-mapping@0.3.5(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedaggregate-error@3.1.0(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@3.2.14.3.0(transitive)
+ Addedappend-transform@2.0.0(transitive)
+ Addedarchy@1.0.0(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbrowserslist@4.24.0(transitive)
+ Addedcaching-transform@4.0.0(transitive)
+ Addedcamelcase@5.3.1(transitive)
+ Addedcaniuse-lite@1.0.30001663(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedclean-stack@2.2.0(transitive)
+ Addedcliui@6.0.0(transitive)
+ Addedcolor-convert@1.9.32.0.1(transitive)
+ Addedcolor-name@1.1.31.1.4(transitive)
+ Addedcommander@7.2.0(transitive)
+ Addedcommondir@1.0.1(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconvert-source-map@1.9.02.0.0(transitive)
+ Addedcross-spawn@7.0.3(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addeddefault-require-extensions@3.0.1(transitive)
+ Addedelectron-to-chromium@1.5.28(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedes6-error@4.1.1(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedfind-cache-dir@3.3.2(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedforeground-child@2.0.0(transitive)
+ Addedfromentries@1.3.2(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedget-package-type@0.1.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-flag@3.0.04.0.0(transitive)
+ Addedhasha@5.2.2(transitive)
+ Addedhtml-escaper@2.0.2(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedindent-string@4.0.0(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedis-stream@2.0.1(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedistanbul-lib-coverage@3.2.2(transitive)
+ Addedistanbul-lib-hook@3.0.0(transitive)
+ Addedistanbul-lib-instrument@4.0.3(transitive)
+ Addedistanbul-lib-processinfo@2.0.3(transitive)
+ Addedistanbul-lib-report@3.0.1(transitive)
+ Addedistanbul-lib-source-maps@4.0.1(transitive)
+ Addedistanbul-reports@3.1.7(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedjsesc@2.5.2(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedlodash.flattendeep@4.4.0(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedmake-dir@3.1.04.0.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-preload@0.2.1(transitive)
+ Addednode-releases@2.0.18(transitive)
+ Addednyc@15.1.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedp-map@3.0.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpackage-hash@4.0.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpicocolors@1.1.0(transitive)
+ Addedpkg-dir@4.2.0(transitive)
+ Addedprocess-on-spawn@1.0.0(transitive)
+ Addedrelease-zalgo@1.0.0(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedrequire-main-filename@2.0.0(transitive)
+ Addedresolve-from@5.0.0(transitive)
+ Addedrimraf@3.0.2(transitive)
+ Addedsemver@6.3.17.6.3(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedspawn-wrap@2.0.0(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedstrip-bom@4.0.0(transitive)
+ Addedsupports-color@5.5.07.2.0(transitive)
+ Addedtest-exclude@6.0.0(transitive)
+ Addedto-fast-properties@2.0.0(transitive)
+ Addedtype-fest@0.8.1(transitive)
+ Addedtypedarray-to-buffer@3.1.5(transitive)
+ Addedupdate-browserslist-db@1.1.0(transitive)
+ Addeduuid@8.3.2(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedwhich-module@2.0.1(transitive)
+ Addedwrap-ansi@6.2.0(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedwrite-file-atomic@3.0.3(transitive)
+ Addedy18n@4.0.3(transitive)
+ Addedyallist@3.1.1(transitive)
+ Addedyargs@15.4.1(transitive)
+ Addedyargs-parser@18.1.3(transitive)
- Removedcommander@5.1.0(transitive)
Updatedcommander@^7.0.0