New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

generator-politico-django

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-politico-django - npm Package Compare versions

Comparing version

to
0.3.0

generators/app/templates/eslintrc.json

87

generators/app/index.js

@@ -10,6 +10,2 @@ const Generator = require('yeoman-generator');

default: path.basename(path.resolve(process.cwd(), '..')),
}, {
name: 'staticUrl',
message: 'What\'s your STATIC_URL (w/out slashes)?',
default: 'static',
}];

@@ -19,8 +15,4 @@

this.appName = answers.appName;
this.staticUrl = answers.staticUrl;
});
}
subgen() {
this.composeWith('politico-interactives:linters');
}
writing() {

@@ -33,46 +25,24 @@ // Package meta

});
// Gulp
// Assets
this.fs.copy(
this.templatePath('gulpfile.js'),
this.destinationPath('gulpfile.js'));
this.templatePath('src/main.app.js'),
this.destinationPath('src/main.app.js'));
this.fs.copy(
this.templatePath('gulp/index.js'),
this.destinationPath('gulp/index.js'));
this.fs.copy(
this.templatePath('gulp/tasks/dev.js'),
this.destinationPath('gulp/tasks/dev.js'));
this.templatePath('src/theme/base.scss'),
this.destinationPath('src/theme/base.scss'));
// Webpack config
this.fs.copyTpl(
this.templatePath('gulp/tasks/build.js'),
this.destinationPath('gulp/tasks/build.js'), {
this.templatePath('webpack.config.dev.js'),
this.destinationPath('webpack.config.dev.js'), {
appName: this.appName,
});
this.fs.copyTpl(
this.templatePath('gulp/server/server.js'),
this.destinationPath('gulp/server/server.js'), {
staticUrl: this.staticUrl,
this.templatePath('webpack.config.prod.js'),
this.destinationPath('webpack.config.prod.js'), {
appName: this.appName,
});
// Assets
this.fs.copy(
this.templatePath('src/js/main-app.js'),
this.destinationPath('src/js/main-app.js'));
this.templatePath('eslintrc.json'),
this.destinationPath('./.eslintrc.json'));
this.fs.copy(
this.templatePath('src/scss/main.scss'),
this.destinationPath('src/scss/main.scss'));
// Webpack config
this.fs.copy(
this.templatePath('webpack-dev.config.js'),
this.destinationPath('webpack-dev.config.js'));
this.fs.copyTpl(
this.templatePath('webpack-prod.config.js'),
this.destinationPath('webpack-prod.config.js'), {
appName: this.appName,
});
this.fs.copy(
this.templatePath('postcss.config.js'),
this.destinationPath('postcss.config.js'));
this.fs.copy(
this.templatePath('babelrc'),
this.destinationPath('./.babelrc'));
this.fs.copy(
this.templatePath('gitignore'),

@@ -82,36 +52,7 @@ this.destinationPath('./.gitignore'));

install() {
const dependencies = [
'autoprefixer',
'babel-core',
'babel-eslint',
'babel-loader',
'babel-preset-env',
'babel-preset-es2015',
'babel-preset-react',
'express',
'express-http-proxy',
'extract-text-webpack-plugin',
'fs-extra',
'glob',
'gulp',
'lodash',
'node-sass',
'open',
'optimize-css-assets-webpack-plugin',
'postcss-loader',
'react',
'react-dom',
'sass-loader',
'style-loader',
'webpack',
'webpack-dev-middleware',
'webpack-hot-middleware',
'webpack-stream',
'yargs',
];
this.yarnInstall(dependencies, { save: true });
this.yarnInstall();
}
end() {
this.log('Done building you development environment. Run "gulp" to start working!');
this.log('🏁 Done building your development environment. \n\n ⚙️ Run "yarn start" to get going!');
}
};
{
"name": "<%= appName %>-staticapp",
"version": "1.0.0",
"description": "Static assets for <%= appName %>, a Django app at Politico.",
"main": "./src/js/main-app.js",
"version": "0.0.1",
"description": "Static assets for <%= appName %>, a Django app.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"start": "webpack-dev-server --config webpack.config.dev.js",
"build": "webpack --mode=production --config webpack.config.prod.js"
},
"author": "",
"license": "ISC"
"dependencies": {
"classnames": "*",
"lodash": "*",
"politico-style": "*",
"react": "*",
"react-dom": "*",
"whatwg-fetch": "*"
},
"devDependencies": {
"@babel/core": "^7.0.0-beta.56",
"babel-loader": "^8.0.0-beta",
"@babel/node": "^7.0.0",
"@babel/plugin-external-helpers": "^7.0.0-beta.56",
"@babel/plugin-proposal-class-properties": "^7.0.0-rc.1",
"@babel/polyfill": "^7.0.0-beta.56",
"@babel/preset-env": "^7.0.0-beta.56",
"@babel/preset-react": "^7.0.0-beta.56",
"@politico/eslint-config-interactives": "*",
"css-loader": "*",
"eslint": "*",
"mini-css-extract-plugin": "*",
"optimize-css-assets-webpack-plugin": "*",
"node-sass": "*",
"portfinder": "*",
"sass-loader": "*",
"style-loader": "*",
"uglifyjs-webpack-plugin": "*",
"webpack": "*",
"webpack-cli": "*",
"webpack-dev-server": "*",
"yargs": "*"
}
}
{
"name": "generator-politico-django",
"version": "0.2.1",
"version": "0.3.0",
"description": "Yeoman generator for building static assets inside django apps at Politico.",

@@ -29,8 +29,14 @@ "main": "index.js",

"devDependencies": {
"eslint": "^3.19.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.3"
"@babel/core": "^7.2.2",
"babel-eslint": "^10.0.1",
"eslint": "==4.19.1",
"eslint-config-standard": "==11.0.0",
"eslint-plugin-babel": "==5.1.0",
"eslint-plugin-emotion": "==9.2.5",
"eslint-plugin-import": "==2.13.0",
"eslint-plugin-node": "==6.0.1",
"eslint-plugin-promise": "==3.8.0",
"eslint-plugin-react": "==7.10.0",
"eslint-plugin-standard": "==3.1.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet