Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nativescript-dev-sass

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-dev-sass

SASS CSS pre-processor for NativeScript projects.

  • 1.0.0-rc.2
  • rc
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

SASS CSS pre-processor for NativeScript projects

(Based on nativescript-dev-less plugin)

npm version


This plugin uses the node-sass compiler to transpile SCSS files to CSS files in NativeScript projects.

How to use


Add the plug-in to your project:

$ tns install sass

Alternatively:

$ npm install nativescript-dev-sass --save-dev

Either of the above commands installs this module and installs the necessary NativeScript build and LiveSync hooks. SASS CSS pre-processing of all .scss or .sass files inside the app folder happens when the project is prepared for build (including LiveSync, Emulate and Watch commands).

After the plugin runs, it will automatically delete all .scss and .sass files from the app package (leaving only the compiled .css)

LiveSync Support


This plugin will work in all versions of NativeScript to transpile SCSS and SASS files, but for LiveSync to work as expected with real-time style updates:

  • NativeScript 2.5 and higher, use version 1.x and higher of this plugin (latest version)
  • NativeScript 2.4.x and lower, use version 0.4.2

You can install a specific version of this plug-in using this command:

$ npm install nativescript-dev-sass@0.4.2 --save-dev

To use the latest release candidates (when available), use this command:

$ npm install nativescript-dev-sass@rc --save-dev

In NativeScript 2.4 and lower, the current version of this plug-in will cause LiveSync to trigger an app restart. The last version of this plug-in that supports real-time updates (with no app restart) in NativeScript 2.4 and lower is 0.4.2.

Breaking Changes


  • As of version 1.0, @import statements require relative paths (previous versions built all paths relative app root)

NOTE: SASS @import syntax


In some cases, the current version of node-sass requires @import statements to explicitly include the filename extension (like .scss). This occurs if files with the same name exist in the same path.

For example:

variables.scss
variables.css
_variables.scss

Node-sass will throw an error if the @import variables; syntax is used. As a workaround, use an explicit filename, like: @import variables.scss;

This is currently on the roadmap for node-sass 4.0. See this issue for more detail.

Keywords

FAQs

Package last updated on 04 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc