Code Monkey home page Code Monkey logo

sitecore-engx-scaffold's Introduction

Sitecore EngX Scaffold

npm version CI

OVERVIEW

The scaffold is a generator based on Yeoman. It is designed to simplify and unify initial solution setup. It can save you time on configuration on early stages of the project.

Sitecore Versions

  • 9.0 Update 1
  • 9.0 Update 2
  • 9.1 Update 0
  • 9.1 Update 1
  • 9.2 Initial Release
  • 9.3 Initial Release

FEATURES

  • Generate a repository with a standard file structure.
  • .NET and JS projects
  • CAKE-build scripts
  • vagrant scripts for development VM setup

Generated solution is fully compliant with Sitecore Helix Guidelines

INSTALLATION

As Sitecore is pretty heavy system you should have around i5+ with 4+ logical cores, 16GB RAM 50GB. VMs contains full operating system so they might be pretty heavy to start and require up to 50GB of free space on HDD

Pre-requisites

  • Administrator rights to the system
  • Node.js v8.9.3 and higher (download)
  • VirtualBox 5.2.4 and higher (download)
  • Vagrant 2.0.4 and higher (download)
  • Visual Studio 2017

Initial generation

  1. There are two possible ways to get generator:
    1. [npmjs.org] npm i generator-sitecore-engx-scaffold
    2. [Manual]
      • Clone repository or update to current version, if you have it already.
      • In repository root following run Powershell (as Administrator) command npm link
  2. Navigate to a location where you usually store your projects. Create a directory with a customer name (by default folder name would be used as a solution name. Do not include spaces or any special characters in it)
  3. Inside the folder run following PS command (again as Administrator) and follow instructions of the generator.
npm i yo -g
npm i generator-sitecore-engx-scaffold -g
yo sitecore-engx-scaffold
  1. Follow the generator instructions.

Adding Helix modules

Once the solution is generated, run following command in the repository root and follow instructions of the generator.:

yo sitecore-engx-scaffold:module

Re-generation

While you do not want to do this in the middle of the project, it is possible to run generation once again. Yeoman will detect conflicts and provide you with options to discard or override changes.

FEEDBACK

If you had some issues during installation, you have ideas or feedback, please, post them to GitHub issues section of this project

sitecore-engx-scaffold's People

Contributors

ashishagin avatar asmagin avatar braunsquared avatar ematseruk avatar fpodshivadlov avatar konstantinrazguliaev avatar pbashilov avatar tanatau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sitecore-engx-scaffold's Issues

Generator doesn't prompt Sitecore update and fails after it

Steps to reproduce
Run yo sitecore-engx-scaffold:module from solution root
Observer error:

events.js:174
throw er; // Unhandled 'error' event
^

TypeError: Cannot read property 'exactVersion' of undefined
at module.exports.writing >(C:\Users\user\AppData\Roaming\npm\node_modules\generator-sitecore-engx-scaffold\generators\module\index.js:113:52)
at Object. (C:\Users\user\AppData\Roaming\npm\node_modules\generator-sitecore-engx-scaffold\node_modules\yeoman-generator\lib\index.js:424:27)
at C:\Users\user\AppData\Roaming\npm\node_modules\generator-sitecore-engx-scaffold\node_modules\run-async\index.js:25:25
at new Promise ()
at C:\Users\user\AppData\Roaming\npm\node_modules\generator-sitecore-engx-scaffold\node_modules\run-async\index.js:24:19
at self.env.runLoop.add.completed (C:\Users\user\AppData\Roaming\npm\node_modules\generator-sitecore-engx-scaffold\node_modules\yeoman-generator\lib\index.js:425:13)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
Emitted 'error' event at:
at Immediate.setImmediate (C:\Users\user\AppData\Roaming\npm\node_modules\generator-sitecore-engx-scaffold\node_modules\yeoman-generator\lib\index.js:433:22)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)`

Cannot install modules due to error with PYTHON variable is missing

Steps to reproduce

  1. Clone the repo
  2. Execute npm i
  3. Observe the problem:

[email protected] install C:\workspace.repo\sitecore-engx-scaffold\node_modules\deasync
node ./build.js
C:\workspace.repo\sitecore-engx-scaffold\node_modules\deasync>if not defined >npm_config_node_gyp (node >"C:\Users\Yauheni_Matseruk\AppData\Roaming\nvm\v12.3.1\node_modules\npm\node_modules>npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node >"C:\Users\Yauheni_Matseruk\AppData\Roaming\nvm\v12.3.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython >(C:\Users\Yauheni_Matseruk\AppData\Roaming\nvm\v12.3.1\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder. (C:\Users\Yauheni_Matseruk\AppData\Roaming\nvm\v12.3.1\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Users\Yauheni_Matseruk\AppData\Roaming\nvm\v12.3.1\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:149:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Yauheni_Matseruk\AppData\Roaming\nvm\v12.3.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\workspace.repo\sitecore-engx-scaffold\node_modules\deasync
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node ./build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.

It seems that the issue is fixed in the latest version of deasync, but in order to resolve it requires update of modules.
abbr/deasync#106

Undefined serialization path in the module scaffold

Project files generated by the "yo sitecore-engx-scaffold:module" command do not have the unicorn serialization path set correctly (note the "undefined" part of Include attribute in the node below) resulting in the Unicorn files not getting published with the project.

<ItemGroup>
    <Content Include="App_Data/unicorn-undefined/**/*.*" />
  </ItemGroup>

Wrong nuget-package references

Tests project generated by the "sitecore-engx-scaffold:module" command refers on wrong versions of nuget-packages:

package id="Sitecore.Abstractions" version="12.0.0"
package id="Sitecore.Analytics" version="12.0.0"
package id="Sitecore.Analytics.Core" version="12.0.0"
package id="Sitecore.Analytics.DataAccess" version="12.0.0"
package id="Sitecore.Analytics.Model" version="12.0.0"
package id="Sitecore.ContentSearch" version="4.0.0"
package id="Sitecore.ContentSearch.Linq" version="4.0.0"
package id="Sitecore.Kernel" version="12.0.0"
package id="Sitecore.Logging" version="12.0.0"
package id="Sitecore.Logging.Client" version="12.0.0"
package id="Sitecore.Mvc" version="3.0.0"
package id="Sitecore.NVelocity" version="9.0.0"
package id="Sitecore.Zip" version="12.0.0"

Most of these packages are not exist. Module has been created for Sitecore 9.1.1.

Sitecore 9.2 support error

Hello I am running into an issue when I build.ps1 solution.

Please let me know if there is anything that I need to adjust on my side to get rid of this error.

Repro step:

npm i yo -g
npm i generator-sitecore-engx-scaffold -g
yo sitecore-engx-scaffold
cd src
build.ps1

image

Missing npm module prevents initial generator setup

When using manual approach for initial generation, error occurs while running npm link command:

Error: Can't find Python executable "C:\Users\USER_NAME\AppData\Programs\Python\Python37-32\python.exe", you can set the PYTHON env variable.

Fix: run command npm install deasync

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.