I've created a JHipster v6.1.2 application with default theme and now I trying to add a new theme
I did it the following updates and executed npm install but without success
added "bootswatch": "4.3.1" in package.json
added #import '~bootswatch/dist/yeti/bootswatch' and #import '~bootswatch/dist/yeti/variables' in vendor.scss
added #import '~bootswatch/dist/yeti/variables'; in global.scss
updated "clientTheme": "yeti" and "clientThemeVariant": "primary" in .yo-rc.json
Is it missing something?
Related
I'm creating a wordpress package which uses acf (Advanced Custom Fields) to get and set the data.
Additional data about the usage:
First in your project's config.php file you set the settings for the composer package. Then in wordpress you can call the block "photoplayer". You can give the block some data and the data is accessible in the composer package.
But now comes my problem. The frontend needs to be in vuejs since this is a composer package and vue is a peerdependency vue isn't accessible because it's in the vendor folder. A hacky way which you don't want to do ever is to install the npm packages inside the package in the vendor folder (this will cause more problems because vue uses singleton). So I choose to make a vue package for this with npm.
Now I've just created the frontend inside a npm package, but how will i get the composer packages data to the npm package in the frontend?
I've thought of an API, but I think that that solution is to overcomplex for such a problem.
Here's a solution to this problem:
Requirements:
main project
npm package (in my case created in vue)
composer package
Here you'll find on how to create and use a local npm package.
Here you'll find on how to create and use a local composer package
First you'll need to install your local packages:
npm i path/to/package/package-name.tgz
composer require path/to/package/
The npm package exports a component:
import MyVueComponent from "./MyVueComponent.vue";
export { MyVueComponent }
This makes it so that we can mount this vue component to the projects createapp:
import { createApp } from 'vue'
import { MyVueComponent } from "my/package";
const app = createApp({})
app.component('MyVueComponent', MyVueComponent)
app.mount('#app')
Now you can use the MyVueComponent as a custom html tag within your #app. Now in the composer package we create a template file something like template.php will do you can name it however you like. Within this template we call the vue component:
<my-vue-component
:name-of-property="'Data you want to provide'"
:name-of-second-prop="'More data'"
></my-vue-component>
Now I've passed some data to the props of the vue component. You can learn how to use props in vue here.
In my case showcasing the template is easily done using ACF and wordpress, but rendering a composer template file is a little out of scope here.
I am trying to use CKEditor for strapi project, but failing to integrate.
What I did so far:
strapi new cms --quickstart It is starting me new cms application.
npm install ckeditor
Edit the code located at ./plugins/content-manager/admin/src/component/Edit/index.js to CKEditor implementation
npm run build to see my changes, tried npm run setup too
But here I'm getting error webpackJsonp is not defined
I'm not providing the code how I modified, because, build command is not reaching till there.
I appreciate any help you can provide
In order to change the default WYSIWYG in Strapi you will need to
Fork the repository check out the CONTRIBUTING GUIDE
Once you have the development setup you can directly modify the code in packages/strapi-plugin-content-manager/admin/src/components/WYSIWYGWithErrors and its related children. Install the dependency in strapi-admin
Uninstall the content manager plugin (again make sure you are running the latest version of Strapi
Copy the strapi-plugin-content-manager package inside your app's plugin folder (rename it content-manager)
Copy the following file in my-app/admin/src/plugins.js and change the paths of the plugins so it matches your new one
run yarn develop
Suppose I would like to change the jhipster command to another name in order to launch the application generator, which source file(s) do I need to modify?
First, check where your npm global binaries (like jhipster command) are installed:
npm bin -g
In this folder, you'll find 2 files jhipster and jhipster.cmd, create a link to them with desired name or rename them and you're done.
Now, assuming you want to create your own distribution of jhipster while
respecting the terms of its Apache 2.0 licence, you should edit the package.json of generator-jhipster and change the bin section.
"bin": {
"jhipster": "./cli/jhipster.js",
"my_jhipster_copy": "./cli/jhipster.js"
},
npm install will create your my_jhipster_copy command
I created a new JHipster project with the following command:
jhipster --skip-client
Since, I skipped client generation via --skip-client, why the newly created project contains the following files and folders which I think are related to frontend and not related to backend anywhere:
node_modules
package.json
.yo-rc.json
yarn.lock
From this link, it seems like it is actually a feature and not a bug.
The purpose of installing a local copy of generator-jhipster is that if you upgrade your global version, the local version will still match what your project uses. This protects you from using a newer entity generator on an older project. You can skip the installation of the local generator-jhipster by using --skip-install (note that your project will then always use the global generator-jhipster)
The .yo-rc.json file has the answers to your prompt and other details about your project that help with the other subgenerators such as entity or import-jdl. This file is important to keep.
I have a package which I want to add it to my project as a new package, not a new module is it possible?
thanks for any hint or clue.
Update
my package is on a repo and I want to add them as a new package, not a new lib module
New package i am assuming you have a package with classes not any full deploy-able module in case of package just copy and past your package in the src directory change package name in classes as required some time. import R.java for claases remove all error import 3rd party libs if require boom its done