You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

generator-jscad

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.2 to 2.2.0

generators/app/templates/main-checkbox.jscad

10

CHANGELOG.md

@@ -0,3 +1,11 @@

## 2.2.0 (2020-09-13)
* Add options for multiple part projects ([63005a5](https://gitlab.com/johnwebbcole/generator-jscad/commit/63005a5))
* Updating readme ([ed33447](https://gitlab.com/johnwebbcole/generator-jscad/commit/ed33447))
## <small>2.1.2 (2019-01-12)</small>
* 2.1.2 ([44051d1](https://gitlab.com/johnwebbcole/generator-jscad/commit/44051d1))
* cicd changes ([decc610](https://gitlab.com/johnwebbcole/generator-jscad/commit/decc610))

@@ -48,4 +56,4 @@

* no message ([857331c](https://gitlab.com/johnwebbcole/generator-jscad/commit/857331c))
* no message ([9572114](https://gitlab.com/johnwebbcole/generator-jscad/commit/9572114))
* no message ([bb05b43](https://gitlab.com/johnwebbcole/generator-jscad/commit/bb05b43))
* no message ([9572114](https://gitlab.com/johnwebbcole/generator-jscad/commit/9572114))
* publish 1.0.1 ([8c26637](https://gitlab.com/johnwebbcole/generator-jscad/commit/8c26637))

@@ -52,0 +60,0 @@ * Rebuit using `generator-generator`. ([d7ea44e](https://gitlab.com/johnwebbcole/generator-jscad/commit/d7ea44e))

@@ -39,2 +39,16 @@ 'use strict';

{
name: 'projectType',
message: 'What type of project?',
default: this.config.get('projectType'),
type: 'list',
choices: [
{ name: 'single part', value: 'single' },
{ name: 'multiple parts choose with a list', value: 'multi-list' },
{
name: 'multiple parts choose with a checkbox',
value: 'multi-checkbox'
}
]
},
{
name: 'author',

@@ -51,3 +65,3 @@ message: 'Author',

return this.prompt(prompts).then(props => {
return this.prompt(prompts).then((props) => {
// To access props later use this.props.someAnswer;

@@ -58,2 +72,3 @@ this.props = props;

this.config.set('description', this.props.description);
this.config.set('projectType', this.props.projectType);
this.config.set('author', this.props.author);

@@ -114,4 +129,10 @@ this.config.set('homepage', this.props.homepage);

if (!this.fs.exists(this.props.name + '.jscad')) {
var template =
this.props.projectType == 'single'
? 'main.jscad'
: this.props.projectType == 'multi-list'
? 'main-list.jscad'
: 'main-checkbox.jscad';
this.fs.copyTpl(
this.templatePath('main.jscad'),
this.templatePath(template),
this.destinationPath(this.props.name + '.jscad'),

@@ -142,2 +163,7 @@ {

);
this.fs.copy(
this.templatePath('prettier.config.js'),
this.destinationPath('prettier.config.js')
);
}

@@ -152,2 +178,21 @@

}
end() {
this.log(`
jscad generator is finished.
Available scripts:
Bundle the '${this.props.name + '.jscad'}' file into the 'dist' directory.
npm start
Run the development VuePress site.
npm run serve
Build the 'dist' directory and the VuePress site.
npm run build
`);
}
};

20

generators/app/templates/gulpfile.js

@@ -1,5 +0,5 @@

/* globals require */
var gulp = require('gulp');
var del = require('del');
var jscadFiles = require('gulp-jscad-files');
var { getInjected } = require('gulp-jscad-files/getPackage');
var merge2 = require('merge2');

@@ -11,4 +11,6 @@ var debug = require('gulp-debug');

gulp.task('clean', function(done) {
del(['dist/*']).then(paths => {
var pkg = require('./package.json');
gulp.task('clean', function (done) {
del(['dist/*']).then((paths) => {
console.log('Deleted files and folders:\n', paths.join('\n')); // eslint-disable-line no-console, no-undef

@@ -19,3 +21,3 @@ done();

gulp.task('inject', function() {
gulp.task('inject', function () {
return gulp

@@ -48,3 +50,3 @@ .src('<%= name %>.jscad')

endtag: '// endinject',
transform: function(filepath, file) {
transform: function (filepath, file) {
return '// ' + filepath + '\n' + file.contents.toString('utf8');

@@ -60,3 +62,3 @@ }

'vuepress',
gulp.series(['inject'], function() {
gulp.series(['inject'], function () {
return gulp

@@ -71,5 +73,5 @@ .src('dist/<%= name %>.jscad')

'default',
gulp.series(['clean', 'inject'], function() {
gulp.series(['clean', 'inject'], function () {
gulp.watch(
['**/*.jscad', 'node_modules/'],
['**/*.jscad', ...getInjected(pkg)],
{

@@ -81,3 +83,3 @@ verbose: true,

ignoreInitial: false,
ignored: ['**/*.*~', 'dist/*', '.vuepress/*']
ignored: ['**/*.*~', 'dist/*', '.vuepress/*', 'public', 'node_modules']
},

@@ -84,0 +86,0 @@ gulp.series(['inject'])

@@ -17,20 +17,21 @@ {

"dependencies": {
"jscad-utils": "^3.0.0"
"@jwc/jscad-utils": "*",
"@jwc/jscad-hardware": "*"
},
"devDependencies": {
"@jscad/web": "^1.10.0",
"@jwc/vue-openjscad": "^1.0.3",
"cross-env": "^5.2.0",
"del": "^3.0.0",
"gulp": "^4.0.0",
"gulp-cli": "^2.0.1",
"@jscad/web": "*",
"@jwc/vue-openjscad": "*",
"cross-env": "^7.0.2",
"del": "^5.1.0",
"gulp": "^4.0.2",
"gulp-cli": "^2.2.0",
"gulp-debug": "^4.0.0",
"gulp-inject": "^5.0.0",
"gulp-jscad-files": "^3.0.0",
"gulp-inject": "^5.0.4",
"gulp-jscad-files": "^4.0.0",
"gulp-plumber": "^1.1.0",
"gulp-terser": "^1.1.6",
"gulp-terser": "^1.2.0",
"gulp-watch": "^5.0.1",
"merge2": "^1.2.3",
"vuepress": "^0.14.8"
"merge2": "^1.3.0",
"vuepress": "^1.1.0"
}
}
{
"name": "generator-jscad",
"version": "2.1.2",
"version": "2.2.0",
"description": "Create a jscad project",

@@ -20,15 +20,15 @@ "homepage": "https://gitlab.com/johnwebbcole/generator-jscad",

"devDependencies": {
"conventional-changelog-cli": "^2.0.11",
"coveralls": "^3.0.2",
"eslint": "^5.9.0",
"eslint-config-prettier": "^3.3.0",
"eslint-config-xo": "^0.25.0",
"eslint-plugin-prettier": "^3.0.0",
"husky": "^1.2.0",
"jest": "^23.5.0",
"lint-staged": "^8.1.0",
"np": "^3.1.0",
"prettier": "^1.15.2",
"conventional-changelog-cli": "^2.0.34",
"coveralls": "^3.1.0",
"eslint": "^7.3.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-xo": "^0.31.0",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^4.2.5",
"jest": "^26.0.1",
"lint-staged": "^10.2.11",
"np": "^6.2.4",
"prettier": "^2.0.5",
"yeoman-assert": "^3.1.0",
"yeoman-test": "^1.7.0"
"yeoman-test": "^2.6.0"
},

@@ -39,7 +39,7 @@ "engines": {

"dependencies": {
"chalk": "^2.1.0",
"command-exists": "^1.2.8",
"chalk": "^4.1.0",
"command-exists": "^1.2.9",
"generator-git-init": "^1.1.3",
"lodash": "^4.17.11",
"yeoman-generator": "^2.0.1",
"lodash": "^4.17.15",
"yeoman-generator": "^4.10.1",
"yosay": "^2.0.1"

@@ -46,0 +46,0 @@ },

@@ -20,2 +20,10 @@ # generator-jscad [![NPM version][npm-image]][npm-url]

You can select the type of project you want to build. A single object project is the default. You can create a multi object project with selection via a dropdown list or a set of check boxes. These are more complex, but allow you to organize and view a much larger project.
![yo jscad cli example](./yo-jscad.gif)
You can also create a VuePress site with a live viewer.
![example vuepress site](./example.gif)
## Running

@@ -31,5 +39,5 @@

MIT © [John Cole](https://johnwebbcole.gitlab.io/)
MIT © [John Cole](https://jwc.dev/)
[npm-image]: https://badge.fury.io/js/generator-jscad.svg
[npm-url]: https://npmjs.org/package/generator-jscad

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc