I have a problem with adding a script to Angular 2 with ng cli outside of the node_modules folder. The script doesn't exist ( or at least I didn't find it ) in the npm registries and it's just a single file I wish to load but cannot:
This is in angular-cli.json :
"scripts": [
"assets/one-signal-sdk.js"
],
This throws a syntax error, saying:
"Unexpected token ? in JSON at position 0"
But, if I manually add the package to node_modules and load it like this:
"scripts": [
"../node_modules/one-signal/one-signal-sdk.js"
],
It's working perfectly fine. Of course, I cannot just add it manually and leave it there because no one will be able to download it via npm install.
Is there a way to add a custom script to the build? Thanks.