This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removes dependencies and integrates fundamentals via npm
- Loading branch information
1 parent
3e7f575
commit d1f1f87
Showing
14 changed files
with
118 additions
and
40 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
VUE_APP_FD_VUE_DEV_TOOLS=disabled | ||
VUE_APP_FD_NAME=Fundamental Vue | ||
VUE_APP_VERSION=0.0.1-beta |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const { | ||
VUE_APP_FD_VUE_DEV_TOOLS, | ||
VUE_APP_FD_NAME, | ||
VUE_APP_VERSION, | ||
} = process.env; | ||
|
||
export const devToolsEnabled = VUE_APP_FD_VUE_DEV_TOOLS === 'enabled'; | ||
export const libName = (VUE_APP_FD_NAME as string) || '<name not set>'; | ||
export const version = VUE_APP_VERSION as string; |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$fd-icons-path : "../../node_modules/fiori-fundamentals/scss/icons/"; // should be declared before the scss import | ||
|
||
$fd-scss-font-path : "../../node_modules/fiori-fundamentals/scss/fonts/"; | ||
|
||
@import "../../node_modules/fiori-fundamentals/scss/all.scss"; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,79 @@ | ||
# Introduction | ||
|
||
> SAP Fundamental-Vue is a UI framework based on [SAP Fiori Fundamentals](https://sap.github.io/fundamental/) and [Vue.js](htts://vuejs.org). | ||
> SAP Fundamental Vue is a UI framework based on [SAP Fiori Fundamentals](https://sap.github.io/fundamental/) and [Vue.js](htts://vuejs.org). | ||
## Installation | ||
There are two ways to install SAP Fundamental-Vue. | ||
Install Fundamental Vue via **NPM**: | ||
|
||
### Via **NPM** | ||
_todo_ | ||
```bash | ||
npm install --save fundamental-vue | ||
``` | ||
|
||
### Via **unpkg** | ||
_todo_ | ||
## Usage | ||
|
||
## Changelog | ||
After installing, you will need to import `fundamental-vue` and make it available to your Vue application. These instructions assume the usage of Vue CLI to scaffold your project. | ||
|
||
* Nothing has changed - yet. | ||
In your project's `main.js`: | ||
|
||
``` | ||
// ... | ||
import FundamentalVue from 'fundamental-vue'; | ||
Vue.use(FundamentalVue); | ||
// ... | ||
``` | ||
|
||
Fundamental Vue does not include the ['Fiori Fundamentals' library](https://github.com/SAP/fundamental) which is required for styling. | ||
|
||
## Install Fiori Fundamentals | ||
The quickest way to get Fiori Fundamentals styling for your components is to include the compiled and minified Fiori Fundamentals CSS library with the following CDN link in your public `index.html` file: | ||
``` | ||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/fiori-fundamentals@1.3.3/dist/fiori-fundamentals.min.css"> | ||
``` | ||
|
||
However, installing the Fiori Fundamentals library with npm (recommended) will give you the flexibility to use individual components and enable [advanced customisation options](https://github.com/SAP/fundamental/wiki/Advanced-Customization). In this case, you do not need the CDN link as this method uses the SASS/SCSS source. | ||
|
||
To install the Fiori Fundamentals SASS/SCSS source: | ||
``` | ||
$ npm install --save fiori-fundamentals | ||
``` | ||
|
||
The following assumes the usage of a module bundler such as [webpack](https://webpack.js.org/). To compile Fiori Fundamentals SASS/SCSS to CSS, two additional packages are required for your bundling process - [sass-loader](https://github.com/webpack-contrib/sass-loader) and [node-sass](https://github.com/sass/node-sass). To install these packages as development dependencies: | ||
|
||
``` | ||
$ npm install sass-loader node-sass --save-dev | ||
``` | ||
|
||
Loading the SCSS and running your project at this point will result in errors relating to the path configuration for icons and fonts. This is a [known issue](https://github.com/SAP/fundamental#known-issues). | ||
|
||
To rectify this, start by creating a new directory ('scss') in your project's `src`. Within this directory, create a main SCSS file ('main.scss') from which to manage your imports, configurations and customisations. | ||
|
||
Add the following to the main SCSS file: | ||
``` | ||
$fd-icons-path : "../node_modules/fiori-fundamentals/scss/icons/"; // should be declared before the scss import | ||
$fd-scss-font-path : "../node_modules/fiori-fundamentals/scss/fonts/"; | ||
@import "../node_modules/fiori-fundamentals/scss/all.scss"; | ||
``` | ||
|
||
Import the main SCSS file in your `App.js` style block to add Fiori Fundamentals styles to your project. | ||
|
||
``` | ||
<style lang='scss'> | ||
... | ||
@import "./scss/main.scss"; | ||
... | ||
</style> | ||
``` | ||
|
||
You can now use the [Playground](https://dist-4d2gqwr8y.now.sh/#/start) to browse the components currently available with Fundamental Vue. | ||
|
||
To use a Fundamental Vue component, paste the desired code snippet from the Playground and configure it as necessarry: | ||
|
||
``` | ||
... | ||
<FdAlert dismissible> | ||
Happy building! 🚀 | ||
</FdAlert> | ||
... | ||
``` |