Comments (2)
The main difference between Unix based OS (Linux\Mac) and Windows is how they identify the file to be executable or interpreted. I think by default it could be a bash\batch script, for example:
yarn install
It will create a temporary file tmp32423.sh
with executable bit (chmod +x) in Unix:
#!/bin/bash
yarn install
For Windows it will be tmp32423.bat
:
yarn install
Then it will let the operating system to figure out the rest.
This can be extended to other types of scripts with Markdown highligh support, for example:
print('hello')
It will create a python file tmp3123.py
on all operating systems. In Unix it will add executable bit and the content will have a starter:
#!/usr/bin/env python
print('hello')
I think this will cover most of the common cases.
That said, I like the idea of environment variable syntax support. With #28 it will reduce data duplication and have cleaner code blocks. I would suggest it will just look for specific word structurce, that is: <Capital var name>=<value>
, to keep Markdown document flexibility. For example:
# build
> some description
To build .... `NODE_ENV=production` ... more text.
npx browserify main.js
Another example:
# production
In production you need the following environment variables set:
- NODE_ENV=production
## build
npx browserify main.js
from saku.
I'm not sure whether this is possible in a cross-platform way. I'd like to keep saku as cross-platform as possible.
On the other hand, I'm planning to support sort of variable or environment variable in a new syntax.
# build
- NODE_ENV=production
npx browserify main.js
(NODE_ENV=production is set as env var.)
This might solve your problem.
from saku.
Related Issues (20)
- Embed saku.md in readme feature HOT 1
- unit test (parse_config.go) HOT 1
- Add Logo HOT 1
- Hidden IS_IN_SAKU env var HOT 1
- Emoji handling HOT 1
- No description message HOT 1
- Abort method HOT 1
- feat: additional opts after '--' HOT 1
- write a blog HOT 2
- separate packages HOT 1
- benchmark go-saku vs node-saku HOT 2
- create CHANGELOG.md HOT 1
- 'Error: Invalid flag' is occurred using with '-i' or '-q'. HOT 2
- Group tasks with headers HOT 6
- Task grouping HOT 1
- Pass arguments to tasks? HOT 4
- saku wrapper HOT 1
- Consider renaming the project to `gump` HOT 3
- saku initializer
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 saku.