You can still use it if you like.
SASS building microservice.
Check the app.json file for any environment variables you might need to add or want to replace. Settings ENVIRONMENT
to [value]
will cause the app to try and load the .env/[value]
file into your environment. This is an easy way to add variables, but don't use this for confidential information.
npm install
npm start
Display information about the Paint service.
Compile SASS into CSS.
Parameters:
-
src
: The source SASS to compile. Either plain SASS, a link to an SASS file or a link to a (optionally gzipped) tarball containing SASS files. In case of an archive, there needs to be astyle.scss
file in the root. Optionally, you can include anoptions.json
file in the archive that sets the options as explained below for theopt
parameter. -
var
: Array of SASS variables to use during compilation. E.g.?var[primary]=green
will result in$primary: green;
-
uvar
: Link to a JSON file that contains SASS variables to use during compilation. Example JSON below.
{
"primary": "green",
"secondary": "#F00"
}
will result in:
$primary: green;
$secondary: #F00;
opt
: Array of options for the service to use. Currently, none are supported. In the future it might look like this:?opt[autoprefixer][browsers]=last%202%20versions&opt[scss][style]=nested
to enable the autoprefixer plugin and configure it to support the latest 2 browser versions as well as configure the nested output format for your CSS result.
See usage but replace npm start
with npm run dev
to run a watch task and reload the server every time you make changes to the code. Some environment variables may not be provided by default for security reasons, ask one of the developers for help if you need these.
We really appreciate any contribution you would like to make, so don't hesitate to report issues or submit pull requests.
This project is released under a MIT license.
If you would like to know more about us, be sure to have a look at our website, or our Twitter accounts Ambassify, Sitebase, JorgenEvens
paint's People
paint's Issues
Prevent infinite running Sass
@while 1
will keep the sass compile process running forver
API response is empty sometimes
When requesting config, the response is logged as empty sometimes. See if we can add some logging to find out if something goes wrong on our end or the api itself
Caching
Ideas for caching
- Cloudfront
- HTTP caching (with ETag, If-Modified, ...)
- Save downloaded resources locally and don't request them again if present
- Save result sass locally and return if URL hasn't changed
Just want to show gratitude
This was a life saver, thank you. Just wanted to say thanks! No issues.
Fix memory issues
Node-sass doesn't seem to release memory after compilation
ideas
- Maybe update to latest verions
- run compilation on separate node process (would also allow us to fix #4)
App crashes on download fail
Disaster recovery
- Uncaught exception handler
- Forever or similar
- Log it
How do we enable pre-fixing?
I see the opt param isn't enabled yet so we can enable pre-fixing, is there a way to manually enable in our own build?
Access Control
Limit who can use the service. Traditional approaches like API keys or authentication are not desirable since your styling needs to be publicly available to users.
Ideas:
- Limit allowed sources
@import handling
- sass-globbing
- prevent access to anything not sent by the requester (e.g.
/etc/passwd
@JorgenEvens )
PostCSS
Unity uses PostCSS with autoprefixer plugin to make nice cross browser CSS.
Threading
Investigate if it would be beneficial to use concurrent node processes
Health check
I've updated the pingdom health check that it use the Heroku URL instead of the cached CloudFront URL.
I've also added an assert that will make sure body{
is present in the returned response.
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.