Comments (7)
atom/atom#3339 would make associating commands with a file type much simpler.
from atom-build.
One easy way of accomplishing this would be to use a Makefile, with a target which depends on all your source files. GNU Make will only execute the build target for files which have been altered since the last time make
was executed - thus only building one file if you only changed one. For instance:
SRCS = a.coffee b.coffee
JS = $(SRCS:.coffee=.js)
all: $(JS)
%.js: %.coffee
./node_modules/coffee-script/bin/coffee --compile $^
Would this help you?
from atom-build.
That's certainly useful for situations where you have an organized directory of files, but when you're just editing a one-off file, it's not particularly convenient to have to create a makefile for it.
Also, take for example modding the popular PC game The Elder Scrolls V: Skyrim. Typically, script editing is done right in the game's /Data/Scripts/Source
directory, which contains every single script file for anything in the game. The makefile idea would break down here, as it'd first have to run through every single one of those files (hundreds, thousands probably). If all you want to do is compile a single script, that's massive overkill.
This situation with Skyrim is actually why I'd like the ability to build single files. The Papyrus Compiler executable takes a script path as a parameter, and an output path. The output path is typically constant, you'd never change it; but the input file would need to be the currently focused file in Atom when you run the build command, or a file that you right-click on to run it. In order to specify this in the package's config, there'd need to be some kind of replacement token like {FILEPATH}
for the parameters.
Associating the "psc" extension with a build command with the package without a config file in each directory that contains them would be even easier, but probably more complex.
I know the use-case I provided is fairly specific, but I believe there are plenty of others out there.
from atom-build.
I'm gonna have a look at this. Just to clarify the need; what you need is a way to specify which build is the currently active one in your editor. For instance, if you used the following .atom-build.json
:
{
"cmd": "cp",
"args": "{ACTIVE_FILE} /home/user/www/public/"
}
And if atom-build
replaced {ACTIVE_FILE}
with the file currently edited, then it would in fact execute the command (if the active file is index.html
)
cp index.html /home/user/www/public/
Did I correctly understand your need?
from atom-build.
Yep, that's basically it - though it should probably use the full file path, rather than a relative one.
I actually hacked together a quick single-purpose version of this package for Papyrus for my own purposes, but it'd be great to see support for this kind of thing "officially". ;)
from atom-build.
I'd love to see what you did. If possible, feel free to submit a PR.
Full path is a good. Maybe even two different replace options where one gives relative to project root, and one is the fully qualified path.
from atom-build.
Fixed with 7feea45. Will be available in v0.9.0
from atom-build.
Related Issues (20)
- Uncaught TypeError: Cannot set property 'innerHTML' of undefined
- Path does not exist -- but it does HOT 1
- Linter does not catch any errors and warnings of Build output.
- Slooooooowwwww startup time
- PATH set to "undefined:/usr/local/bin" on Mac OS
- Uncaught TypeError: newProjectPaths.filter is not a function
- cannot autosave
- Feature suggestion
- Uncaught Error: read ENOTCONN
- Uncaught Error: Status 'Refreshing targets for ~/Documents\Research\Dissertation' is already set #89
- Scrollbar not visible.
- Error matching not working? HOT 2
- Uncaught Error: Cannot find module '../src/term'Require stack:- $ATOM_HOME/packages\platformio-...
- Uncaught Error: Cannot find module '../src/term'Require stack:- $ATOM_HOME/packages\platformio-...
- Uncaught Error: Cannot find module '../src/term'Require stack:- $ATOM_HOME/packages\platformio-...
- Uncaught Error: Cannot find module '../src/term'Require stack:- $ATOM_HOME/packages\platformio-...
- Uncaught Error: Cannot find module '../src/term'Require stack:- $ATOM_HOME/packages\platformio-...
- Uncaught Error: Cannot find module '../src/term'Require stack:- $ATOM_HOME/packages\platformio-...
- HTMLDocument.registerElement is deprecated.
- Error in Windows 10 with .atom-build.yml
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 atom-build.