The first step is to install Node.js. You will then need a code editor: I personally recommend Visual Studio Code.
Create an empty folder named "Sandstone Projects": it will contain all your future Sandstone projects. Inside this folder, open a terminal then run the following commands:
npx [email protected] create <my-project>
<my-project>with your project's name. It will only be the name of the project folder, not the name of the data pack. Example:
npx [email protected] create my-first-sandstone-project
Answer the different questions. Congratulations, you created your first Sandstone project!
To build the data pack, run the following command:
# Using NPM npm run build
# Using Yarn yarn build
# Using Sand sand build
⚙️ You will see Sandstone built your data pack inside a folder. Check it out!
The downside of
buildis that it only builds your data pack once. To build then rebuild on each change, run
# Using NPM npm run watch
# Using Yarn yarn watch
# Using Sand sand watch
⚙️ Now, each time you make a change to one of your files, Sandstone will build the data pack.
👉 Your setup is now finished. Start writing your first function! Your first function