@deriv-com/custom-scripts 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # Webflow Custom Scripts Management
2
+
3
+ This repository manages custom scripts for Webflow's header and footer. Instead of directly injecting the code into Webflow, you will create a pull request (PR) to this repository. Upon merging the PR, the scripts will be published to NPM, allowing you to update the version in Webflow headers and footers as needed.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Getting Started](#getting-started)
8
+ - [Installation](#installation)
9
+ - [Usage](#usage)
10
+ - [Contributing](#contributing)
11
+ - [Versioning](#versioning)
12
+ - [License](#license)
13
+
14
+ ## Getting Started
15
+
16
+ To get started with this project, you need to have Node.js and npm installed on your machine.
17
+
18
+ ### Prerequisites
19
+
20
+ - [Node.js](https://nodejs.org/) (v14.x or later)
21
+ - [npm](https://www.npmjs.com/)
22
+
23
+ ### Installation
24
+
25
+ 1. Clone the repository:
26
+
27
+ ```sh
28
+ git clone https://github.com/deriv-com/webflow-custom-scripts.git
29
+ cd webflow-custom-scripts
30
+ ```
31
+
32
+ 2. Install the dependencies:
33
+
34
+ ```sh
35
+ npm install
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ### Adding Custom Scripts
41
+
42
+ 1. **Create a new directory** for your functionality inside the `src/js` or `src/css` directory.
43
+
44
+ 2. **Add your custom scripts** inside the newly created directory.
45
+
46
+ 3. **Import your scripts** into the barrel file (`js/index.js` or `css/index.css`):
47
+
48
+ ```js
49
+ // src/js/index.js
50
+ import YourFunction from './your-new-directory/custom-script.js';
51
+ ```
52
+
53
+ ```css
54
+ /* src/css/index.css */
55
+ @import './your-new-directory/custom-style.css';
56
+ ```
57
+ 4. **Export your scripts (JS Only)** in the barrel file (`js/index.js`):
58
+
59
+ ```js
60
+ // src/js/index.js
61
+ export {
62
+ ...,
63
+ YourFunction
64
+ ...,
65
+ } ;
66
+ ```
67
+
68
+
69
+ ### Publishing to NPM
70
+
71
+ After your PR is reviewed and merged, the new version will be generated automatically and then it will published to NPM.
72
+
73
+ ### Updating Webflow
74
+
75
+ 1. **Update the version** of the custom scripts in Webflow's header and footer settings.
76
+
77
+ ```html
78
+ <script src="https://cdn.jsdelivr.net/npm/your-package-name@version/dist/js/custom1.min.js"></script>
79
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/your-package-name@version/dist/css/custom1.min.css">
80
+ ```
81
+
82
+ ## Contributing
83
+
84
+ We welcome contributions! Please follow these steps to contribute:
85
+
86
+ 1. Create a new branch.
87
+ 2. Make your changes.
88
+ 3. Commit your changes.
89
+ 4. Push to the branch.
90
+ 5. Create a new Pull Request on GitHub.
91
+
92
+ ## Versioning
93
+
94
+ This project uses [Semantic Versioning](https://semver.org/). For the versions available, see the [tags on this repository](https://github.com/yourusername/webflow-custom-scripts/tags).
95
+
@@ -0,0 +1 @@
1
+ *{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-o-font-smoothing:antialiased;scrollbar-width:none}@media (min-width: 992px) and (max-width: 1200px){.new-navbar_menu-left-desctop{font-size:14px}.new-navbar_dropdown-toggle,.new-navbar_link{padding:.5rem .75rem}header h1{font-size:3rem}header p{font-size:14px;width:81%}}.tabs_menu-scroll-mobile{display:flex;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}.disable-scroll{overflow:hidden}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@deriv-com/custom-scripts",
3
+ "version": "1.0.3",
4
+ "private": false,
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "dev": "vite",
13
+ "build": "vite build",
14
+ "preview": "vite preview"
15
+ },
16
+ "devDependencies": {
17
+ "@semantic-release/changelog": "^6.0.3",
18
+ "@semantic-release/github": "^10.0.6",
19
+ "@semantic-release/npm": "^12.0.1",
20
+ "@semantic-release/release-notes-generator": "^14.0.0",
21
+ "autoprefixer": "^10.4.19",
22
+ "cssnano": "^7.0.2",
23
+ "rollup-plugin-postcss": "^4.0.2",
24
+ "rollup-plugin-terser": "^7.0.2",
25
+ "vite": "^5.2.13"
26
+ }
27
+ }