Comments (5)
So I dug into what it would take to install our atom npm packages into atom_modules
and our system npm packages into node_modules
.
- We would need to modify npm to allow installing to a custom global directory.
- We would then need to modify apm to install globally (to
atom_modules
) when installing packages and dependencies used within atom and locally when installing dependencies that should be used when using grunt/apm. As part of this step we would most likely need to modify atom'spackage.json
such thatdevDependencies
anddependencies
only included the modules that would be used by the system npm. - We would need to modify atom-shell on windows and on osx to set
NODE_PATH
toatom_modules
before node is loaded within atom-shell.
However after outlining those steps, I wonder if we could do something clever where we create shims for node and npm after doing the initial bootstrap.
node
#!/bin/bash
ATOM_BIN=`dirname "${BASH_SOURCE[0]}"`/../atom-shell/Atom.app/Contents/MacOS/Atom
ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 $ATOM_BIN "$@"
npm
#!/bin/sh
NPM_BIN=`dirname "${BASH_SOURCE[0]}"`/../node_modules/atom-package-manager/node_modules/.bin/npm
$NPM_BIN
And then we tell people to export PATH=./bin/:$PATH
so that if they execute node (or anything that uses node) from atom's root that it will use our node instead of the system node? I'd prefer this approach, thoughts?
from apm.
What about putting apm
and grunt
dependencies in their old own folders with their own node_modules
folder in there?
So build/node_modules
would be where all the grunt dependencies go and apm/node_modules
would be where all the apm dependencies go. We could add grunt.sh
and apm.sh
at the root of the atom repo so the commands could still be run from there and they would just shim to the build/node_modules/.bin/grunt
and apm/node_modules/atom-package-manager/.bin/apm
.
That leaves the root node_modules
for just package dependencies and module dependencies that actually need to ship with atom.
We could move the grunt dependencies perhaps into buid/package.json
to segregate.
Just an initial idea, still not 100% clear on if it would work but could be worth a spike.
from apm.
Would any of this be necessary if we this worked?
from apm.
It's more about fixing this atom/atom#1067, I guess I should have put my comment there.
from apm.
apm now has a login
command, closing this out.
from apm.
Related Issues (20)
- `apm publish` fails to publish new package from !`master` branch with error: `That repo does not exist, isn't an atom package, or you do not have access`
- Can't publish package: "Package must be in a Git repository before publishing", but it isn't true (I think) HOT 3
- apm doesn't seem to check if a more recent version of node, git, etc. is installed
- [Feature Request - Package] XAML C# Editor Support
- Ignore a shebang in a packages-file.
- amp publish minor causes Registering package in asida/atom-language-m-lang repository failed: That repo does not exist, isn't an atom package, or you do not have access
- Packages do not install
- Not able to publish in ATOM HOT 1
- error in windows cmd HOT 2
- Feature Request: Support Packages Hosted On Gitea Instance
- Feature Request: Self Hostable Repositories
- Kite isn't installing HOT 2
- apm package installs are failing... server code 500. HOT 29
- Atom package installs failing with server code 500. HOT 10
- Unpublish themes. I can't unpublish themes after I removed github repositories.
- Cannot publish package - authentication problem HOT 4
- Unable to publish package (API HTTP 500): Creating new version failed: Application error
- Please announce and document that package management is disabled
- cannot use apm in Windows batch file
- install packages from settings Install in Atom
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apm.