Created
March 7, 2017 05:57
-
-
Save ansballard/917aad8fc9372f32646987d8177d4e0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
const { writeFile } = require("fs"); | |
const { join } = require("path"); | |
module.exports = { | |
// ... | |
activate() { | |
atom.config.observe("packagename.SettingName", updateStylesheet); | |
return this.subscriptions = new CompositeDisposable(); | |
} | |
// ... | |
}; | |
function updateStylesheet(value) { | |
writeFile(join(__dirname, "..", "styles", "custom.less"), `// AUTOGENERATED\n@SettingName: ${value};\n`, "utf8"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment