This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace require.js with webpack, remove bower (#701)
* Replace bower with npm. Really slow r.js build * WIP replace r.js with webpack Successfully replaced r.js with webpack and have gotten a local instance of Insights working with webpack-built js and css bundles. There are many issues remaining. Just to name a few: * The size of the bundles are very large compared to r.js bundles * Libraries are repeatedly included in many bundles * The speed of building bundles, while faster than r.js, is still slow * A separate prod and dev configs are needed * A proper webpack dev environment still needs to be set up (e.g. hot module reloading) * reference correct location for pattern library npm packages * add bourbon npm package and link to it * globalization functionality is split into its own chunk * Optimized bundle size * Set-up webpack-dev-server * Remove vendor folder. fast-sass-loader. * Use fast source-map method for development. * Split dev/prod webpack config. Lots of comments! * No need for "vendor" bundle, just use "manifest". * Git ignore webpack-stats.json * Common chunks vendor bundle. Fix sassc. * Prettier the webpack configs * Run prettier-eslint instead * Passing karma tests with webpack * Fix linting error * Fix bootstrap dropdowns * Remove legacy bower, requirejs, django-compressor * Fix the travis build * Precompile the pattern-library to .css file * Fix post-install font copy paths * Update translations * Missed a few legacy rjs related lines * Linting: stray import in urls.py * Dropdowns in application-main. Compile to .scss * Use sass-loader. Update README. * Require full bootstrap to try fix acceptance tests * Load webpack in base.html so landing works on dev * Output webpack bundles to /static not /assets * Update translations * Add compression-webpack-plugin TBD whether django can actually figure out how to find the .gz files, but until then here is the best webpack prod config I could come up with. * Add babel-loader. Convert two js files to es2015 * Fix eslint errors: separate es6 eslint config * Fix packages for NPM 5. Add lock file. * Ignore /static/bundles in extract_translations * Try adding q to package.json? * Remove extraneous merge header * Remove cldr-data-downloader & q from package.json * Move webpack packages from dev to dependencies * Use backbone 1.2.3. Reintroduce router execute. * Remove package-lock.json until I figure it out * Remove webpack-compression-plugin (using CDN now) * Use webpack-merge for config inheritance * Use chunkhash in filename in production * Create source-maps in uglify on prod * Fix eslint & errors. Add prettier. More ES2015. * Address PR comments in _font.scss * Address PR comments in npm-post-install.sh * Make DJANGO_DEV_SERVER webpack proxy configurable
- Loading branch information
Showing
128 changed files
with
1,512 additions
and
2,418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"extends": "eslint-config-edx", | ||
"parser": "babel-eslint", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"allowImportExportEverywhere": true, | ||
"plugins": ["syntax-dynamic-import"] | ||
}, | ||
"plugins": [ | ||
"import" | ||
], | ||
"globals": { | ||
"gettext": true, // added by django for i18n | ||
"setFixtures": true, // added globally by jasmine-jquery | ||
"sinon": true, // used for mocking | ||
"requirejs": true | ||
}, | ||
"settings": { | ||
"import/resolver": "webpack" | ||
}, | ||
"rules": { | ||
"import/no-unresolved": ["error", {"amd": true}], | ||
"global-require" : "off" | ||
// global-require turned off due to https://github.com/eslint/eslint/issues/4812. Fixed in v3.1.1 | ||
// consider turning rule on after upgrading to ESLint 3.1.1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.