Skip to content
This repository was archived by the owner on Jan 17, 2022. It is now read-only.

[deprectable] #137

Open
whatllb opened this issue Jun 12, 2017 · 7 comments
Open

[deprectable] #137

whatllb opened this issue Jun 12, 2017 · 7 comments
Assignees

Comments

@whatllb
Copy link

whatllb commented Jun 12, 2017

The filename "src/[deprectable]angular-intro.js" is causing problems.
I'm trying to run your source version so I can debug an issue and help you. There's other dev reasons I might want to run your source version in the future.

I'm fighting with gulp to accept your filename "src/[deprectable]angular-intro.js".
I'm trying a normal operation and it really doesn't like the []'s. I can't even rename it. This should work, but I can't figure out if/how to escape the braces for gulp.

        gulp.src(
            "node_modules/angular-intro.js/src/[deprectable]angular-intro.js"
        )
            .pipe(gulp.dest('thirdparty/js/angular-intro.js')),

This would a lot more standard if this satisfied your naming intention: angular-intro.deprecated.js
For now I'll temporarily rename the file in the package I download.

"deprectable" is a strange word. Maybe you mean "deprecated"? If so, angular-intro.deprecated.js might be a better choice. It would keep the standard filename prefix for your module and make it easier to manage copying them around (it would also mimic the intent of the file, like "min" does). For instance, I copy select module files into a "thirdparty" directory rather than deploying my "node_modules" directory. If I needed that src js file, then your project would be the only npm module I have with files that aren't prefixed by the module name. My gulpfile contains lots of lines like this, and I'm sure they don't collide with each other in thirdparty/js:

        // Analytics
        gulp.src([
            'node_modules/angulartics/dist/angulartics*.js',
            'node_modules/angulartics/src/angulartics*.js'
        ])
            .pipe(gulp.dest('thirdparty/js')),
@whatllb
Copy link
Author

whatllb commented Jun 12, 2017

As it turns out, I MUST use the unminified version of your JS. It would be really nice if you renamed it.

When I use angular-intro.min.js, and it pipes through RequireJS optimizer, I end up with this error when I run my code (and I'm really unsure of how to fix it):

Uncaught Error: Mismatched anonymous define() module: function (e,t){var n={open:"open",closed:"closed"},r="angular-intro",i={},o=function(){function r(){this.intro=t()}return r.prototype.addListener=function(t,n){ [...]

When I use angular-intro.js (your [deprectable]angular-intro.js), it goes through RequireJS optimizer and works just fine.

I have RequireJS doing its own uglify2 while building a single main.js module. So the problem appears to be RequireJS's uglification (minification) of your .min.js vs your .js file.

You could try to track down the error yourself, but it might just be something that you recommend people use the .js file instead. RequireJS Mismatch page

Is there any reason you don't just name the ts output src/angular-intro.js ?
Or, probably better, since it's a build output you could do this??

  • src/ng-intro.component.ts
  • build/angular-intro.js
  • build/angular-intro.min.js

I'm realizing your js file probably isn't "deprecated" as I was guessing... since it's actually just an interim build file.

@millerscout
Copy link
Collaborator

@whatllb hello o/
i was kind of disconnected these days.

i was reading your issue and i don't recommend that [deprectable] version, because it was the last code used, before being re-written in typescript.

with your last post, i do agree that in some environments it's common to minify external components/plugins.

i'll get it done asap :)

sorry for the delay

@whatllb
Copy link
Author

whatllb commented Jun 13, 2017

Cool. I appreciate the help.

Do you have an interim .js file from the ts build that you're going to surface along with the minified version?
Let me know when its ready, and I'll put the non-minified version in and see if it satisfies RequireJS.

Thanks.

millerscout pushed a commit to millerscout/angular-intro.js that referenced this issue Jun 13, 2017
- added a file that's not minified.
- updated [deprectable]angular.intro.js to  angular-intro.deprectable.js to the standard format.
@millerscout
Copy link
Collaborator

sure, it's on that PR,

the file is available on "build/angular.intro.js"
the only change on this file is the banner on top displaying the current build version.

i had to update the version accordingly or it could break someone's build :)

may you please check on your environment before we merge? i'll be grateful 😄

@whatllb
Copy link
Author

whatllb commented Jun 13, 2017

I don't understand what I need to do.
I changed the PR to 137, and I'm getting:

npm ERR! git rev-list -n1 issue137: fatal: ambiguous argument 'issue137': unknown revision or path not in the working tree.

I can get #135, but #137 doesn't work for me.

millerscout pushed a commit to millerscout/angular-intro.js that referenced this issue Jun 16, 2017
- added a file that's not minified.
- updated [deprectable]angular.intro.js to  angular-intro.deprectable.js to the standard format.
millerscout pushed a commit to millerscout/angular-intro.js that referenced this issue Jun 16, 2017
- added a file that's not minified.
- updated [deprectable]angular.intro.js to  angular-intro.deprectable.js to the standard format.
@millerscout
Copy link
Collaborator

Hello again, sorry for not answer before :x

but i did make a beta release with this fix:

https://github.com/mendhak/angular-intro.js/releases/tag/v4.0.0-beta

with this version i hope we can check the problem and see if you noticed something that we can improve
😄

@whatllb
Copy link
Author

whatllb commented Jun 30, 2017

I downloaded your zip file and saw the build/angular-intro.js file, and that the dependency is now IntroJs.
I assume you'll make the change in the main branch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants