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

Leo webpack #158

Merged
merged 13 commits into from
Mar 29, 2017
Merged

Leo webpack #158

merged 13 commits into from
Mar 29, 2017

Conversation

dwido
Copy link
Contributor

@dwido dwido commented Mar 21, 2017

@sagivf @tsachis @MrFrankel @danrevah

speak now or forever hold your peace

dwido added 10 commits March 19, 2017 23:02
this is needed in order to move to new version of sinon,
what's left is to add the delay, the new version already supports delay
so there is no need to customize the sinon code just adjust leonardo
added 'npm start' to serve local

'npm wp' to build project
upgrade the whole unit test and fix broken test...
cheers to new webpack
@sagivf
Copy link
Contributor

sagivf commented Mar 21, 2017

@dwido Haven't had time to check it yet. Hopefully tomorrow.
But you can go ahead and merge if it works.

@dwido
Copy link
Contributor Author

dwido commented Mar 21, 2017

@sagivf I made all the changes that were left, so now it's fuller, i ran amplifyapp against this version, so we should be good :)

@sagivf
Copy link
Contributor

sagivf commented Mar 24, 2017

@dwido This is awesome! super fast development.
I tried it agains my rjq-ui project and it worked perfectly,
using global script, import or require - all worked 🎉

There are however two issues in the angularIL development environment (it does run tough):

  • Getting these weird error.
    image

  • Not sure it's related to this change or the above error, but the recorder doesn't work if the mocking is off, strange...

@dwido
Copy link
Contributor Author

dwido commented Mar 24, 2017

@sagivf I haven't seen this error, how did you get it? can you send steps to reproduce?

@sagivf
Copy link
Contributor

sagivf commented Mar 24, 2017

Just checkout your branch and did npm run start I'll try to reinstall stuff but it's weird that errors are coming from non related files.

@sagivf
Copy link
Contributor

sagivf commented Mar 24, 2017

@dwido reinstalling the bower components in angularIL removes the errors. We need to check why webpack is looking there... Issue 2 is still there.

@sagivf
Copy link
Contributor

sagivf commented Mar 28, 2017

@dwido l once we merge this I will work on the docs.
Is there any reason not to? I think is works nicely

@dwido
Copy link
Contributor Author

dwido commented Mar 29, 2017 via email

@sagivf sagivf merged commit 1c56cdd into master Mar 29, 2017
@Incognito
Copy link

Incognito commented Apr 3, 2017

Thanks for this patch, it this tool makes my development easier and I'm able to integrate it with my webpack build now.

If you're working on docs, this may be useful to you. I'm using webpack 1.13 at the moment and here's what I had to change to get this working:

--- a/package.json
+++ b/package.json
     "image-webpack-loader": "^3.3.0",
-    "normalize.css": "^3.0.3"
+    "leonardojs": "^3.1.8",
+    "normalize.css": "^3.0.3",
+    "script-loader": "^0.7.0"
   },
   "devDependencies": {
     "angular-mocks": "^1.5.0",
diff --git a/webpack.config.js b/webpack.config.js
index 8027261..5b11f20 100644
--- a/webpack.dev.config.js
+++ b/webpack.dev.config.js 
 module.exports = {
   devtool: 'source-map',
-  entry: {},
+  entry: {
+    mock: './mock.js'
+  },
   module: {
     loaders: [
       { test: /\.css$/, loader: 'style!css' },
+      { test: /\/leonardo.js/, loader: 'script-loader' },
       {
diff --git a/mock.js b/mock.js
new file mode 100644
index 0000000..14812c8
--- /dev/null
+++ b/mock.js
+import 'leonardojs'
+
+window.Leonardo.addStates([]);

I'm leaving this here in the event someone else needs to discover how to do this, or you'd like to include this in your documentation.

@sagivf
Copy link
Contributor

sagivf commented Apr 3, 2017

Thanks @Incognito, we hope this tool can help you out. We use it on a number of projects and it helps us out a lot. Were trying to make it as friendly as possible to accommodate the different (and changing) environments and use cases. We'd be thrilled to hear what works and what doesn't...

Regarding the docs. You are absolutely right - i've got an issue on it - #152. I'll be working on it soon.

@dwido dwido deleted the leo-webpack branch July 2, 2017 06:54
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.

3 participants