Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFR] Migrate from require to Webpack #428

Merged
merged 13 commits into from
May 22, 2015
Merged

[RFR] Migrate from require to Webpack #428

merged 13 commits into from
May 22, 2015

Conversation

jpetitcolas
Copy link
Contributor

  • Use Webpack to compile JS on the fly
  • Add missing code mirror dependencies (for JSON field formatting)
  • Use Webpack to compile SASS on the fly
  • Update build process to use Webpack
  • Remove requirejs dependency

@jpetitcolas
Copy link
Contributor Author

Results are pretty encouraging. Using webpack-dev-server, a change in my code triggers a refresh in approximately 200ms instead of more than 7s before.

@@ -5,8 +5,7 @@
<title>Angular admin</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="build/ng-admin.css">
<script src="build/angular.js" type="text/javascript"></script>
<script src="build/ng-admin.js" type="text/javascript"></script>
<script src="http://localhost:8080/build/ng-admin.min.js" type="text/javascript"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the absolute URL?

@fzaninotto
Copy link
Member

We'll have many conflicts with @jeromemacias and @manuquentin PRs. Can you discuss the merging strategy together?

@fzaninotto
Copy link
Member

So I closed #333 in favor of this one. It means that you should add the double build (with and without dependencies) to the to-do list of this PR.

@jeromemacias
Copy link
Contributor

Can you rebase please (because of .travis.yml change) ?

@jpetitcolas
Copy link
Contributor Author

PR rebased for .travis.yml changes.

Two editions are now built: a normal version and a standalone one. The normal one is a light one, including only ng-admin code. The standalone version embeds all dependencies: fonts (as data URL), JS and CSS dependencies, etc. You just have to embed it and a configuration file to get a fully functional version.

Protractor tests are red. I'm working on it, and then it would be in RFR.

@jeromemacias
Copy link
Contributor

Need last rebase, sorry.

*/
ma-choice-field select option:empty {
display:none;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed anymore (see #435)

@jpetitcolas
Copy link
Contributor Author

Switching to RFR. Don't forget to add ?w=1 as files are now flattened with removal of define functions.

@@ -80,8 +80,9 @@
"teaser": "Consequuntur id aut soluta aspernatur sit. Aut doloremque recusandae sit saepe ut quas earum. Quae pariatur iure et ducimus non. Cupiditate dolorem itaque in sit.",
"body": "<p>Aut molestiae quae explicabo voluptas. Assumenda ea ipsam quia. Rerum rerum magnam sunt doloremque dolorem nulla. Eveniet ut aliquam est dignissimos nisi molestias dicta. Dolorum et id esse illum. Ea omnis nesciunt tempore et aut. Ut ullam totam doloribus recusandae est natus voluptatum officiis. Ea quam eos velit ipsam non accusamus praesentium.</p><p>Animi et minima alias sint. Reiciendis qui ipsam autem fugit consequuntur veniam. Vel cupiditate voluptas enim dolore cum ad. Ut iusto eius et.</p><p>Quis praesentium aut aut aut voluptas et. Quam laudantium at laudantium amet. Earum quidem eos earum quaerat nihil libero quia sed.</p><p>Autem voluptatem nostrum ullam numquam quis. Et aut unde nesciunt officiis nam eos ut distinctio. Animi est explicabo voluptas officia quos necessitatibus. Omnis debitis unde et qui rerum. Nisi repudiandae autem mollitia dolorum veritatis aut. Rem temporibus labore repellendus enim consequuntur dicta autem. Illum illo inventore possimus officiis quidem.</p><p>Ullam accusantium eaque perspiciatis. Quidem dolor minus aut quidem. Praesentium earum beatae eos eligendi nostrum. Dolor nam quo aut.</p><p>Accusamus aut tempora omnis magni sit quos eos aut. Vitae ut inventore facere neque rerum. Qui esse rem cupiditate sit.</p><p>Est minus odio sint reprehenderit. Consectetur dolores eligendi et quaerat sint vel magni. Voluptatum hic cum placeat ad ea reiciendis laborum et. Eos ab id suscipit.</p><p>Enim corporis tenetur quia molestias qui tempore ullam. Explicabo sunt quis alias autem tempora modi aliquid. Modi in enim neque enim. Natus quia dolor eum. Deserunt porro ex doloribus quis architecto impedit soluta. Accusamus sunt animi quidem expedita ullam reiciendis vitae. Autem voluptates neque rerum amet. Vero non ipsa veritatis aspernatur placeat. Pariatur sequi voluptas eos qui pariatur dignissimos aut et. Ut odit et ipsa provident eum. Omnis autem eveniet expedita maiores repellendus quia. Et voluptas quo eum exercitationem impedit vitae.</p>",
"views": 559,
"published_at": "2012-08-24",
"tags": []
"published_at": "2012-08-22",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should revert this file, and perhaps try to ignore further modifications on it using .gitignore?

@jpetitcolas jpetitcolas changed the title [WIP] Migrate from require to Webpack [RFR] Migrate from require to Webpack May 19, 2015
@jeromemacias
Copy link
Contributor

Need another reabse (and it will re-trigger Travis).

@jpetitcolas
Copy link
Contributor Author

Karma unit seems to freeze, but no locally. Asking a debug VM to Travis.

@jpetitcolas
Copy link
Contributor Author

Green! \o/

manuquentin added a commit that referenced this pull request May 22, 2015
[RFR] Migrate from require to Webpack
@manuquentin manuquentin merged commit 93244dc into master May 22, 2015
@manuquentin manuquentin deleted the webpack branch May 22, 2015 07:11
@manuquentin
Copy link
Contributor

image

@jpetitcolas
Copy link
Contributor Author

image

jeromemacias added a commit that referenced this pull request May 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants