Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@bcoe/test-alternate-main

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bcoe/test-alternate-main - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+1
-1
package.json
{
"name": "@bcoe/test-alternate-main",
"version": "1.0.1",
"version": "1.0.2",
"description": "teting a scoped package search (abc123)",

@@ -5,0 +5,0 @@ "main": "foo.min.js",

@@ -1,17 +0,44 @@

THIS IS A WORK IN PROGRESS!
# test alternate `main`
@angular/cli does not minify HTML templates before the AOT process leading to extremely bloated script modules.
Test specifying an alternate `main`:
NOTE:
**package.json**:
This currently does not work as a global package, install it locally to the project.
```json
{
"name": "@bcoe/test-alternate-main",
"version": "1.0.1",
"description": "teting a scoped package search (abc123)",
"main": "foo.min.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Ben Coe <ben@npmjs.com>",
"license": "ISC",
"dependencies": {
},
"repository": {
"url": "https://github.com/bcoe-test/testing-publishes.git"
}
}
```
BUGS:
**index.js**:
Currently since the latest node.js update calling this as a npm script e.g. ngc, no longer works. To call this as a npm script please do the following:
```js
module.exports = {donotload: 'me'}
```
build: node ./node_modules/ng-compiler/cli/index.js build
**foo.min.js**:
build-prod: node ./node_modules/ng-compiler/cli/index.js build --prod
```js
module.exports = {test: 'two'}
```
serve: node ./node_modules/ng-compiler/cli/index.js serve
```bash
Benjamins-MacBook-Pro:tmp benjamincoe$ npm i @bcoe/test-alternate-main
@bcoe/test-alternate-main@1.0.1 node_modules/@bcoe/test-alternate-main
Benjamins-MacBook-Pro:tmp benjamincoe$ node
> require('@bcoe/test-alternate-main')
{ test: 'two' }
```