开源软件名称:Lightning-Design-System
开源软件地址:https://gitee.com/mirrors/Lightning-Design-System
开源软件介绍:
Salesforce Lightning Design System
Welcome to the source code repository for Salesforce Lightning Design System, brought to you by Salesforce UX. SLDS is... - Tailored for building Salesforce apps: Using the Lightning Design System markup and CSS framework results in UIs that reflect the Salesforce Lightning look and feel.
- Continuously updated: As long as you’re using the latest version of the Lightning Design System, your pages are always up to date with Salesforce UI changes.
Getting StartedThis project utilizes Storybook for component development. If you would like to know more about Storybook or how it works, check out their website. Project Installation & Setup:- Clone the repository down locally.
cd into the project and run npm install to install all project dependencies.
Running the Development Environment:The Storybook development environment can be started by running npm start Whenever you add, remove, or alter a component's css annotation metadata, you'll need to restart Storybook to see those changes. Configuring Node and NVMNode v12 is recommended for use with the Design System repository, and NVM is the recommended choice for managing multiple versions of Node on your computer. A .nvmrc file is included in this project to aid in local development. To utilize it for setting your project's node version, run nvm use in the root of the directory.Additionally, you can set up a deeper shell integration for automatically invoking the nvmrc file when you change into the project directory byfollowing these instructions. Developing in StorybookOnce the development server is started with npm start , you can load it at http://localhost:9002. AnnotationsSee the annotations guide. Tasksnpm start
Starts the Storybook server for local development. npm run gulp -- lint
Lint the code base for syntax and stylistic errors. # Lint indentation, Sass, JavaScript filesnpm run gulp -- lint# Lint languages independentlynpm run gulp -- lint:sassnpm run gulp -- lint:javascriptnpm run gulp -- lint:javascript:testnpm run gulp -- lint:spacesnpm run gulp -- lint:html# HTML5 validationnpm run gulp -- lint:vnu# HTML5 validation on comma separated blueprint namesnpm run gulp -- lint:vnu --components button,path,trees# a11y validationnpm run gulp -- lint:a11y# a11y validation on comma separated blueprint namesnpm run gulp -- lint:a11y --components button,path,trees# Lint examples using vnu, aXe, slds validation, and HTML5 validationnpm run gulp -- lint:examples Pull Request ChecksTo run all the checks a pull request will run in Travis use the following command. # To run every check against all blueprintsnpm run pr-checks# To run every check but target certain blueprints for slow checks like aXe and vnunpm run pr-checks -- --components button,path,trees Compilationnpm run build-dist
Generate the Lightning Design System into the .dist directory. npm run gulp -- styles
Compile Sass to CSS into .assets/styles . npm run gulp -- clean
Delete temporary build and local files. Statsnpm run gulp -- styles:stats : Useful stats about the project's deliverables.
Testsnpm test : run all tests
TroubleshootingSee the troubleshooting guide. Contributing Back to SLDSSee the contributing guide. LicensesGot Feedback?Please open a new GitHub Issue. |
请发表评论