Skip to content

Commit 77eaf24

Browse files
ast(cli): Recursively parse AST (#341)
* ast(refactor): wip refactor * ast(refactor): wip refactor * ast(init): refactor * test(refactor): refactor test suite * tests(define): swap args * ast(parsing): refactor stuff * ast(init): refactor * ast(init): refactor tests * chore(tests): remove some unneeded tests * chore(pkg): update package.json * chore(project): clear up project structure * chore(cli): remove unneded files * chore(git): add gitignore to yeoman file * chore(deps): update pkg.json * tests(snapshots): update snapshots * tests(jest): use empty module for snapshots * tests(snap): only test one prop
1 parent 4f8ebee commit 77eaf24

File tree

227 files changed

+5846
-17257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+5846
-17257
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ yarn-error.log
2424

2525
# Test Compilation
2626
test/js/*
27+
28+
# Yeoman file
29+
.yo-rc.json

bin/config-yargs.js

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -140,40 +140,47 @@ module.exports = function(yargs) {
140140
},
141141
"output-filename": {
142142
type: "string",
143-
describe: optionsSchema.definitions.output.properties.filename.description,
143+
describe:
144+
optionsSchema.definitions.output.properties.filename.description,
144145
group: OUTPUT_GROUP,
145146
defaultDescription: "[name].js",
146147
requiresArg: true
147148
},
148149
"output-chunk-filename": {
149150
type: "string",
150-
describe: optionsSchema.definitions.output.properties.chunkFilename.description,
151+
describe:
152+
optionsSchema.definitions.output.properties.chunkFilename.description,
151153
group: OUTPUT_GROUP,
152154
defaultDescription:
153155
"filename with [id] instead of [name] or [id] prefixed",
154156
requiresArg: true
155157
},
156158
"output-source-map-filename": {
157159
type: "string",
158-
describe: optionsSchema.definitions.output.properties.sourceMapFilename.description,
160+
describe:
161+
optionsSchema.definitions.output.properties.sourceMapFilename
162+
.description,
159163
group: OUTPUT_GROUP,
160164
requiresArg: true
161165
},
162166
"output-public-path": {
163167
type: "string",
164-
describe: optionsSchema.definitions.output.properties.publicPath.description,
168+
describe:
169+
optionsSchema.definitions.output.properties.publicPath.description,
165170
group: OUTPUT_GROUP,
166171
requiresArg: true
167172
},
168173
"output-jsonp-function": {
169174
type: "string",
170-
describe: optionsSchema.definitions.output.properties.jsonpFunction.description,
175+
describe:
176+
optionsSchema.definitions.output.properties.jsonpFunction.description,
171177
group: OUTPUT_GROUP,
172178
requiresArg: true
173179
},
174180
"output-pathinfo": {
175181
type: "boolean",
176-
describe: optionsSchema.definitions.output.properties.pathinfo.description,
182+
describe:
183+
optionsSchema.definitions.output.properties.pathinfo.description,
177184
group: OUTPUT_GROUP
178185
},
179186
"output-library": {
@@ -184,7 +191,8 @@ module.exports = function(yargs) {
184191
},
185192
"output-library-target": {
186193
type: "string",
187-
describe: optionsSchema.definitions.output.properties.libraryTarget.description,
194+
describe:
195+
optionsSchema.definitions.output.properties.libraryTarget.description,
188196
choices: optionsSchema.definitions.output.properties.libraryTarget.enum,
189197
group: OUTPUT_GROUP,
190198
requiresArg: true
@@ -235,18 +243,24 @@ module.exports = function(yargs) {
235243
"watch-stdin": {
236244
type: "boolean",
237245
alias: "stdin",
238-
describe: optionsSchema.properties.watchOptions.properties.stdin.description,
246+
describe:
247+
optionsSchema.properties.watchOptions.properties.stdin.description,
239248
group: ADVANCED_GROUP
240249
},
241250
"watch-aggregate-timeout": {
242-
describe: optionsSchema.properties.watchOptions.properties.aggregateTimeout.description,
243-
type: optionsSchema.properties.watchOptions.properties.aggregateTimeout.type,
251+
describe:
252+
optionsSchema.properties.watchOptions.properties.aggregateTimeout
253+
.description,
254+
type:
255+
optionsSchema.properties.watchOptions.properties.aggregateTimeout
256+
.type,
244257
group: ADVANCED_GROUP,
245258
requiresArg: true
246259
},
247260
"watch-poll": {
248261
type: "string",
249-
describe: optionsSchema.properties.watchOptions.properties.poll.description,
262+
describe:
263+
optionsSchema.properties.watchOptions.properties.poll.description,
250264
group: ADVANCED_GROUP
251265
},
252266
hot: {
@@ -267,13 +281,15 @@ module.exports = function(yargs) {
267281
},
268282
"resolve-alias": {
269283
type: "string",
270-
describe: optionsSchema.definitions.resolve.properties.alias.description,
284+
describe:
285+
optionsSchema.definitions.resolve.properties.alias.description,
271286
group: RESOLVE_GROUP,
272287
requiresArg: true
273288
},
274289
"resolve-extensions": {
275290
type: "array",
276-
describe: optionsSchema.definitions.resolve.properties.alias.description,
291+
describe:
292+
optionsSchema.definitions.resolve.properties.alias.description,
277293
group: RESOLVE_GROUP,
278294
requiresArg: true
279295
},
@@ -289,13 +305,16 @@ module.exports = function(yargs) {
289305
requiresArg: true
290306
},
291307
"optimize-min-chunk-size": {
292-
describe: optionsSchema.properties.optimization.properties.splitChunks.oneOf[1].properties.minSize.description,
308+
describe:
309+
optionsSchema.properties.optimization.properties.splitChunks.oneOf[1]
310+
.properties.minSize.description,
293311
group: OPTIMIZE_GROUP,
294312
requiresArg: true
295313
},
296314
"optimize-minimize": {
297315
type: "boolean",
298-
describe: optionsSchema.properties.optimization.properties.minimize.description,
316+
describe:
317+
optionsSchema.properties.optimization.properties.minimize.description,
299318
group: OPTIMIZE_GROUP
300319
},
301320
prefetch: {

docs/AddGenerator.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ <h3 class="subsection-title">Extends</h3>
186186
</div>
187187

188188
<nav>
189-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AddGenerator.html">AddGenerator</a></li><li><a href="InitGenerator.html">InitGenerator</a></li><li><a href="LoaderGenerator.html">LoaderGenerator</a></li><li><a href="PluginGenerator.html">PluginGenerator</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addOrUpdateConfigObject">addOrUpdateConfigObject</a></li><li><a href="global.html#checkIfExistsAndAddValue">checkIfExistsAndAddValue</a></li><li><a href="global.html#createArrayWithChildren">createArrayWithChildren</a></li><li><a href="global.html#createEmptyArrayProperty">createEmptyArrayProperty</a></li><li><a href="global.html#createExternalRegExp">createExternalRegExp</a></li><li><a href="global.html#createFunctionWithArguments">createFunctionWithArguments</a></li><li><a href="global.html#createIdentifierOrLiteral">createIdentifierOrLiteral</a></li><li><a href="global.html#createLiteral">createLiteral</a></li><li><a href="global.html#createObjectWithSuppliedProperty">createObjectWithSuppliedProperty</a></li><li><a href="global.html#createOrUpdatePluginByName">createOrUpdatePluginByName</a></li><li><a href="global.html#createProperty">createProperty</a></li><li><a href="global.html#defineTest">defineTest</a></li><li><a href="global.html#findAndRemovePluginByName">findAndRemovePluginByName</a></li><li><a href="global.html#findInvocation">findInvocation</a></li><li><a href="global.html#findPluginsByName">findPluginsByName</a></li><li><a href="global.html#findRootNodesByName">findRootNodesByName</a></li><li><a href="global.html#findVariableToPlugin">findVariableToPlugin</a></li><li><a href="global.html#generatorCopy">generatorCopy</a></li><li><a href="global.html#generatorCopyTpl">generatorCopyTpl</a></li><li><a href="global.html#getPackageManager">getPackageManager</a></li><li><a href="global.html#getPathToGlobalPackages">getPathToGlobalPackages</a></li><li><a href="global.html#getRequire">getRequire</a></li><li><a href="global.html#getRootPathModule">getRootPathModule</a></li><li><a href="global.html#isAssignment">isAssignment</a></li><li><a href="global.html#isType">isType</a></li><li><a href="global.html#loaderCreator">loaderCreator</a></li><li><a href="global.html#loopThroughObjects">loopThroughObjects</a></li><li><a href="global.html#makeLoaderName">makeLoaderName</a></li><li><a href="global.html#mapOptionsToTransform">mapOptionsToTransform</a></li><li><a href="global.html#pluginCreator">pluginCreator</a></li><li><a href="global.html#processPromise">processPromise</a></li><li><a href="global.html#pushCreateProperty">pushCreateProperty</a></li><li><a href="global.html#pushObjectKeys">pushObjectKeys</a></li><li><a href="global.html#replaceAt">replaceAt</a></li><li><a href="global.html#resolvePackages">resolvePackages</a></li><li><a href="global.html#runMigration">runMigration</a></li><li><a href="global.html#runSingleTransform">runSingleTransform</a></li><li><a href="global.html#serve">serve</a></li><li><a href="global.html#spawnChild">spawnChild</a></li><li><a href="global.html#spawnNPM">spawnNPM</a></li><li><a href="global.html#spawnNPMWithArg">spawnNPMWithArg</a></li><li><a href="global.html#spawnYarn">spawnYarn</a></li><li><a href="global.html#spawnYarnWithArg">spawnYarnWithArg</a></li><li><a href="global.html#transform">transform</a></li><li><a href="global.html#traverseAndGetProperties">traverseAndGetProperties</a></li><li><a href="global.html#webpackGenerator">webpackGenerator</a></li></ul>
189+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AddGenerator.html">AddGenerator</a></li><li><a href="InitGenerator.html">InitGenerator</a></li><li><a href="LoaderGenerator.html">LoaderGenerator</a></li><li><a href="PluginGenerator.html">PluginGenerator</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addOrUpdateConfigObject">addOrUpdateConfigObject</a></li><li><a href="global.html#addProperty">addProperty</a></li><li><a href="global.html#createIdentifierOrLiteral">createIdentifierOrLiteral</a></li><li><a href="global.html#createLiteral">createLiteral</a></li><li><a href="global.html#createOrUpdatePluginByName">createOrUpdatePluginByName</a></li><li><a href="global.html#createProperty">createProperty</a></li><li><a href="global.html#defineTest">defineTest</a></li><li><a href="global.html#findAndRemovePluginByName">findAndRemovePluginByName</a></li><li><a href="global.html#findInvocation">findInvocation</a></li><li><a href="global.html#findPluginsArrayAndRemoveIfEmpty">findPluginsArrayAndRemoveIfEmpty</a></li><li><a href="global.html#findPluginsByName">findPluginsByName</a></li><li><a href="global.html#findRootNodesByName">findRootNodesByName</a></li><li><a href="global.html#findVariableToPlugin">findVariableToPlugin</a></li><li><a href="global.html#generatorCopy">generatorCopy</a></li><li><a href="global.html#generatorCopyTpl">generatorCopyTpl</a></li><li><a href="global.html#getPackageManager">getPackageManager</a></li><li><a href="global.html#getPathToGlobalPackages">getPathToGlobalPackages</a></li><li><a href="global.html#getRequire">getRequire</a></li><li><a href="global.html#getRootPathModule">getRootPathModule</a></li><li><a href="global.html#isType">isType</a></li><li><a href="global.html#loaderCreator">loaderCreator</a></li><li><a href="global.html#makeLoaderName">makeLoaderName</a></li><li><a href="global.html#mapOptionsToTransform">mapOptionsToTransform</a></li><li><a href="global.html#pluginCreator">pluginCreator</a></li><li><a href="global.html#processPromise">processPromise</a></li><li><a href="global.html#replaceAt">replaceAt</a></li><li><a href="global.html#resolvePackages">resolvePackages</a></li><li><a href="global.html#runMigration">runMigration</a></li><li><a href="global.html#runSingleTransform">runSingleTransform</a></li><li><a href="global.html#serve">serve</a></li><li><a href="global.html#spawnChild">spawnChild</a></li><li><a href="global.html#spawnNPM">spawnNPM</a></li><li><a href="global.html#spawnNPMWithArg">spawnNPMWithArg</a></li><li><a href="global.html#spawnYarn">spawnYarn</a></li><li><a href="global.html#spawnYarnWithArg">spawnYarnWithArg</a></li><li><a href="global.html#transform">transform</a></li><li><a href="global.html#traverseAndGetProperties">traverseAndGetProperties</a></li><li><a href="global.html#webpackGenerator">webpackGenerator</a></li></ul>
190190
</nav>
191191

192192
<br class="clear">
193193

194194
<footer>
195-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Apr 21 2018 09:19:39 GMT+0300 (EEST)
195+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 27 2018 20:28:13 GMT+0200 (CEST)
196196
</footer>
197197

198198
<script> prettyPrint(); </script>

docs/InitGenerator.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ <h3 class="subsection-title">Extends</h3>
186186
</div>
187187

188188
<nav>
189-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AddGenerator.html">AddGenerator</a></li><li><a href="InitGenerator.html">InitGenerator</a></li><li><a href="LoaderGenerator.html">LoaderGenerator</a></li><li><a href="PluginGenerator.html">PluginGenerator</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addOrUpdateConfigObject">addOrUpdateConfigObject</a></li><li><a href="global.html#checkIfExistsAndAddValue">checkIfExistsAndAddValue</a></li><li><a href="global.html#createArrayWithChildren">createArrayWithChildren</a></li><li><a href="global.html#createEmptyArrayProperty">createEmptyArrayProperty</a></li><li><a href="global.html#createExternalRegExp">createExternalRegExp</a></li><li><a href="global.html#createFunctionWithArguments">createFunctionWithArguments</a></li><li><a href="global.html#createIdentifierOrLiteral">createIdentifierOrLiteral</a></li><li><a href="global.html#createLiteral">createLiteral</a></li><li><a href="global.html#createObjectWithSuppliedProperty">createObjectWithSuppliedProperty</a></li><li><a href="global.html#createOrUpdatePluginByName">createOrUpdatePluginByName</a></li><li><a href="global.html#createProperty">createProperty</a></li><li><a href="global.html#defineTest">defineTest</a></li><li><a href="global.html#findAndRemovePluginByName">findAndRemovePluginByName</a></li><li><a href="global.html#findInvocation">findInvocation</a></li><li><a href="global.html#findPluginsByName">findPluginsByName</a></li><li><a href="global.html#findRootNodesByName">findRootNodesByName</a></li><li><a href="global.html#findVariableToPlugin">findVariableToPlugin</a></li><li><a href="global.html#generatorCopy">generatorCopy</a></li><li><a href="global.html#generatorCopyTpl">generatorCopyTpl</a></li><li><a href="global.html#getPackageManager">getPackageManager</a></li><li><a href="global.html#getPathToGlobalPackages">getPathToGlobalPackages</a></li><li><a href="global.html#getRequire">getRequire</a></li><li><a href="global.html#getRootPathModule">getRootPathModule</a></li><li><a href="global.html#isAssignment">isAssignment</a></li><li><a href="global.html#isType">isType</a></li><li><a href="global.html#loaderCreator">loaderCreator</a></li><li><a href="global.html#loopThroughObjects">loopThroughObjects</a></li><li><a href="global.html#makeLoaderName">makeLoaderName</a></li><li><a href="global.html#mapOptionsToTransform">mapOptionsToTransform</a></li><li><a href="global.html#pluginCreator">pluginCreator</a></li><li><a href="global.html#processPromise">processPromise</a></li><li><a href="global.html#pushCreateProperty">pushCreateProperty</a></li><li><a href="global.html#pushObjectKeys">pushObjectKeys</a></li><li><a href="global.html#replaceAt">replaceAt</a></li><li><a href="global.html#resolvePackages">resolvePackages</a></li><li><a href="global.html#runMigration">runMigration</a></li><li><a href="global.html#runSingleTransform">runSingleTransform</a></li><li><a href="global.html#serve">serve</a></li><li><a href="global.html#spawnChild">spawnChild</a></li><li><a href="global.html#spawnNPM">spawnNPM</a></li><li><a href="global.html#spawnNPMWithArg">spawnNPMWithArg</a></li><li><a href="global.html#spawnYarn">spawnYarn</a></li><li><a href="global.html#spawnYarnWithArg">spawnYarnWithArg</a></li><li><a href="global.html#transform">transform</a></li><li><a href="global.html#traverseAndGetProperties">traverseAndGetProperties</a></li><li><a href="global.html#webpackGenerator">webpackGenerator</a></li></ul>
189+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AddGenerator.html">AddGenerator</a></li><li><a href="InitGenerator.html">InitGenerator</a></li><li><a href="LoaderGenerator.html">LoaderGenerator</a></li><li><a href="PluginGenerator.html">PluginGenerator</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addOrUpdateConfigObject">addOrUpdateConfigObject</a></li><li><a href="global.html#addProperty">addProperty</a></li><li><a href="global.html#createIdentifierOrLiteral">createIdentifierOrLiteral</a></li><li><a href="global.html#createLiteral">createLiteral</a></li><li><a href="global.html#createOrUpdatePluginByName">createOrUpdatePluginByName</a></li><li><a href="global.html#createProperty">createProperty</a></li><li><a href="global.html#defineTest">defineTest</a></li><li><a href="global.html#findAndRemovePluginByName">findAndRemovePluginByName</a></li><li><a href="global.html#findInvocation">findInvocation</a></li><li><a href="global.html#findPluginsArrayAndRemoveIfEmpty">findPluginsArrayAndRemoveIfEmpty</a></li><li><a href="global.html#findPluginsByName">findPluginsByName</a></li><li><a href="global.html#findRootNodesByName">findRootNodesByName</a></li><li><a href="global.html#findVariableToPlugin">findVariableToPlugin</a></li><li><a href="global.html#generatorCopy">generatorCopy</a></li><li><a href="global.html#generatorCopyTpl">generatorCopyTpl</a></li><li><a href="global.html#getPackageManager">getPackageManager</a></li><li><a href="global.html#getPathToGlobalPackages">getPathToGlobalPackages</a></li><li><a href="global.html#getRequire">getRequire</a></li><li><a href="global.html#getRootPathModule">getRootPathModule</a></li><li><a href="global.html#isType">isType</a></li><li><a href="global.html#loaderCreator">loaderCreator</a></li><li><a href="global.html#makeLoaderName">makeLoaderName</a></li><li><a href="global.html#mapOptionsToTransform">mapOptionsToTransform</a></li><li><a href="global.html#pluginCreator">pluginCreator</a></li><li><a href="global.html#processPromise">processPromise</a></li><li><a href="global.html#replaceAt">replaceAt</a></li><li><a href="global.html#resolvePackages">resolvePackages</a></li><li><a href="global.html#runMigration">runMigration</a></li><li><a href="global.html#runSingleTransform">runSingleTransform</a></li><li><a href="global.html#serve">serve</a></li><li><a href="global.html#spawnChild">spawnChild</a></li><li><a href="global.html#spawnNPM">spawnNPM</a></li><li><a href="global.html#spawnNPMWithArg">spawnNPMWithArg</a></li><li><a href="global.html#spawnYarn">spawnYarn</a></li><li><a href="global.html#spawnYarnWithArg">spawnYarnWithArg</a></li><li><a href="global.html#transform">transform</a></li><li><a href="global.html#traverseAndGetProperties">traverseAndGetProperties</a></li><li><a href="global.html#webpackGenerator">webpackGenerator</a></li></ul>
190190
</nav>
191191

192192
<br class="clear">
193193

194194
<footer>
195-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Apr 21 2018 09:19:39 GMT+0300 (EEST)
195+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 27 2018 20:28:13 GMT+0200 (CEST)
196196
</footer>
197197

198198
<script> prettyPrint(); </script>

0 commit comments

Comments
 (0)