angular-intro.js icon indicating copy to clipboard operation
angular-intro.js copied to clipboard

No js files in npm package

Open whatllb opened this issue 8 years ago • 9 comments

When I install via npm, it only contains typescript files. I saw your repository has: build/angular-intro.min.js I'm using node, npm, gulp, I need the js files. Ideally both src and build.

$ npm install angular-intro.js $ cd node_modules/angular-intro.js/ $ ls src ng-intro.component.ts $ ls build ng-intro.component.d.ts

whatllb avatar Jun 10 '17 04:06 whatllb

Created a PR you can test it like so:

"dependencies": {
    "angular-intro.js": "git://github.com/mendhak/angular-intro.js.git#issue135"
},

mendhak avatar Jun 10 '17 06:06 mendhak

Strange, adding that line caused npm install errors

[...]m-mendhak-angular-intro-js-git-issue135-6f23faf2' does not appear to be a git repository npm ERR! fatal: Could not read from remote repository.

But if I kept repeating the npm install, it eventually worked.

Yes, it produced .js files

$ cd node_modules/angular-intro.js/ $ ls src '[deprectable]angular-intro.js' ng-intro.component.ts $ ls build angular-intro.min.js angular-intro.min.js.map ng-intro.component.d.ts

BTW, "deprectable" is a strange word. Do 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 avatar Jun 12 '17 01:06 whatllb

Oops, I didn't mean to close this. You still need to commit the solution.

whatllb avatar Jun 12 '17 01:06 whatllb

so what is the fix? I tried using the git://github.com/mendhak/angular-intro.js.git#issue135 but i dont get js files, as it stands I cant import angular-introjs into my app. I see there is a postinstall script, is that what creates the js files? when i do a npm run postinstall i get (node:27110) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

any help appreciated, thanks.

ianqueue avatar Jun 26 '17 18:06 ianqueue

The pull request is merged so just waiting on the next release to go out so that it gets pushed to npmjs.org

In the meantime - if the above didn't work, try the https version:

"dependencies": {
    "angular-intro.js": "https://github.com/mendhak/angular-intro.js.git#issue135"
}

Or even without the #issue135 - since it's merged into master:

    "angular-intro.js": "https://github.com/mendhak/angular-intro.js.git"

Then you will find the JS files in ./node_modules/angular-intro.js/build/

mendhak avatar Jun 26 '17 18:06 mendhak

ah... import ngIntroJs from 'angular-intro.js/src/[deprectable]angular-intro'; works can't get the build paths to work... this is all odd

ianqueue avatar Jun 26 '17 18:06 ianqueue

I cant seem to get the example working... does this work with angular 1.5.8? I updated your plunker for that cdn version and it breaks as well

ianqueue avatar Jun 26 '17 19:06 ianqueue

nevermind... got things working, thanks

ianqueue avatar Jun 27 '17 14:06 ianqueue

I'm not as adept at github as you are, and those special references are causing problems for my build environment. Often I'm getting errors trying to fetch with npm. I did get a copy to come down though.

I was using. "angular-intro.js": "https://github.com/mendhak/angular-intro.js.git",

I'm see the src/[deprectable]angular-intro.js file.

whatllb avatar Jun 30 '17 15:06 whatllb