3.2.3 • Published 4 years ago
@salesforce-ux/design-system-previewer v3.2.3
Design System Previewer
This previewer is intended to work with the Salesforce Lightning Design System.
Installation
npm install @salesforce-ux/design-system-previewer --save-dev
Usage
const createPreviewer = require('@salesforce-ux/design-system-previewer');
const previewer = createPreviewer({
// where are your static assets
publicPath: {
'/assets': [ path.resolve(__dirname, '../assets') ] // this uses express.static under the hood
},
// where is your css?
cssUrl: '/assets/styles/index.css',
// get me some comments as a string
getComments: (done) => done(null, "all comments in system"),
// get me some markup for a component/variant
getMarkup: (component, variant, done) => done(null, "get Component/Variant markup"),
});
previewer.listen(3003, ({ server, emit }) => {
// when your css changes
emit('style');
// when your markup changes
emit('markup');
// when your annotations changes
emit('comments');
console.log(`Previewer available at: http://localhost:${server.address().port}/preview`);
});
Development
This project is meant to run by https://github.com/salesforce-ux/design-system
The command (from design-system) is npm run previewer-dev
Any changes should live reload from that point on.
Licenses
Source code is licensed under BSD 3-Clause
3.2.3
4 years ago
3.2.2
4 years ago
3.2.1
5 years ago
3.2.0
6 years ago
3.1.0
6 years ago
3.0.0
6 years ago
2.2.8
6 years ago
2.2.7
6 years ago
2.2.6
7 years ago
2.2.5
7 years ago
2.2.4
7 years ago
2.1.4
7 years ago
2.1.3
7 years ago
2.1.2
7 years ago
2.1.1
7 years ago
2.1.0
7 years ago
2.0.9
7 years ago
2.0.8
7 years ago
2.0.7
7 years ago
2.0.6
7 years ago
2.0.5
7 years ago
2.0.3
7 years ago
2.0.2
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.9.0
7 years ago
1.1.3
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago